Neurocaps

Latest version: v0.21.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 15 of 19

0.11.0

🚀 New/Added
- Added new function `change_dtype` to make it easier to change the dtypes of each subject's numpy array to assist with
memory usage, especially if doing the CAPs analysis on a local machine.
- Added new parameters - `output_dir`, `file_name`, and `return_dict` ` to `standardize` to save dictionary, the
`return_dict` defaults to True.
- Adds a new version attribute so you can check the current version using `neurocaps.__version__`

♻ Changed
- Adds back python 3.12 classifier. The `CAP.caps2surf` function may still not work well but if its detected that
neurocaps is being installed using python 3.12, setuptools is installed to prevent the pkgresources error.

🐛 Fixes
- Minor fix for `file_name` parameter in `merge_dicts`. If user does not supply a `file_name` when saving the dictionary,
it will provide a default file_name now instead of producing a Nonetype error.

💻 Metadata
- Minor docstrings revisions, mostly to the typehint for ``subject_timeseries``.

0.10.0.post2

💻 Metadata
- Minor metadata update to docstrings to remove curly braces from inside the list object of certain parameters to
not make it seem as if it is supposed to be a strings inside a dictionary which is inside a list as opposed to strings
in a list.

0.10.0.post1

💻 Metadata
- Minor metadata update to denote that `run` and `runs` parameter can be a string too.

0.10.0

- Adds nbformat as dependency for plotly. - **new to [0.10.0]**
- In `TimeseriesExtractor.get_bold`, several checks are done to ensure that subjects have the necessary files for
extraction. Subjects that have zero nifti, confound files (if confounds requested), event files (if requested), etc
are automatically eliminated from being added to the list for timeseries extraction. A final check assesses, the run
ID of the files to see if the subject has at least one run with all necessary files to avoid having subjects with all
the necessary files needed but all are from different runs. This is most likely a rare occurrence but it is better to be
safer to ensure that even a rare occurrence doesn't result in a crash. The continue statement that skips the subject
only worked if no condition was specified.
- Removes in-place operations when standardizing to avoid numpy casting issues due to incompatible dtypes.
- Additional deep copy such as deep copying any setter properties to ensure external changes does not result internal
changes.
- Some important fixes were left out of the original version.
- These fixes includes:
- Removal of the `epsilon` parameter in `self.get_caps` and replacement with `std[std < np.finfo(np.float64).eps] = 1.0`
to prevent divide by 0 issues and numerical instability issues.
- Deep copy `subject_timeseries` in `standardize` and `parcel_approach`. In their functions, in-place operations
are performed which could unintentionally change the external versions of these parameters
- Added try-except block in `TimeseriesExtractor.get_bold` when attempting to obtain the `tr`, to issue a warning
when `tr` isn't specified and can't be extracted from BOLD metadata. Extraction will be continued.
- Fixed error when using `silhouette` method without multiprocessing where the function called the elbow method instead
of the silhouette method. This error affects versions 0.9.6 to 0.9.9.
- Fix some file names of output by adding underscores for spaces in group names.

💻 Metadata
- Drops the python 3.12 classifier. All functions except for `CAP.caps2surf` works on python 3.12. Additionally, for
python 3.12, you may need to use `pip install setuptools` if you receive an error stating that
"ModuleNotFoundError: No module named 'pkg_resources'". - new to [0.10.0]
- Ensure user knows that all image files are outputted as pngs.
- Clarifications of some doc strings, stating that Bessel's correction is used for standardizing and that for
`CAP.calculate_metrics` can accept subject timeseries not used for generating the k-means model.
- Corrects docstring for `standardize` from parameter being `subject_timeseries_list` to `subject_timeseries`.

0.9.9.post3

🐛 Fixes
- Noted an issue with file naming in `CAP.calculate_metrics` that causes the suffix of the file name to append
to subsequent file names when requesting multiple metrics. While it doesn't effect the content inside the file it is an
irritating issue. For instance "-temporal_fraction.csv" became "-counts-temporal_fraction.csv" if user requested "counts"
before "temporal fraction".

💻 Metadata
- But Zenodo on PyPi.

0.9.9.post2

💻 Metadata
- All docstrings now at a satisfactory point of being well formatted and explanatory.
- Fixes issues with docstring not being formatted correctly when reading in an IDE like Jupyter notebook.

Page 15 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.