Commit 33f85a0a authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Merge branch 'mnt/deprecations' into 'master'

Mnt/deprecations

See merge request fsl/fslpy!286
parents bed22ace 41114fb2
Pipeline #7871 passed with stages
in 28 minutes and 54 seconds
......@@ -24,6 +24,9 @@ Deprecated
``canHaveGui``, ``inSSHSession``, ``inVNCSession``, ``wxPlatform``,
``wxFlavour``, ``glVersion``, ``glRenderer``, and ``glIsSoftwareRenderer``.
Equivalent functions are being added to the ``fsleyes-widgets`` library.
* The :mod:`fsl.utils.filetree` package has been deprecated, and will be
removed in a future version of ``fslpy`` - it is now published as a separate
library on [PyPI](https://pypi.org/project/file-tree/).
......
......@@ -733,7 +733,7 @@ def isValidFancySliceObj(sliceobj, shape):
# We only support boolean numpy arrays
# which have the same shape as the image
return (isinstance(sliceobj, np.ndarray) and
sliceobj.dtype == np.bool and
sliceobj.dtype == bool and
np.prod(sliceobj.shape) == np.prod(shape))
......
......@@ -701,7 +701,7 @@ def calcVertexNormals(vertices, indices, fnormals):
the mesh.
"""
vnormals = np.zeros((vertices.shape[0], 3), dtype=np.float)
vnormals = np.zeros((vertices.shape[0], 3), dtype=float)
# TODO make fast. I can't figure
# out how to use np.add.at to
......
......@@ -627,8 +627,8 @@ def rescale(oldShape, newShape, origin=None):
if origin is None:
origin = 'centre'
oldShape = np.array(oldShape, dtype=np.float)
newShape = np.array(newShape, dtype=np.float)
oldShape = np.array(oldShape, dtype=float)
newShape = np.array(newShape, dtype=float)
ndim = len(oldShape)
if len(oldShape) != len(newShape):
......
......@@ -289,7 +289,7 @@ of the short variable names defined in the
Running a pipeline on a subset of participants/sessions/runs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Suppose you want to run your pipeline on a subset of your data while testing.
Suppose you want to run your pipeline on a subset of your data while testing.
You may want to do this if your data has a a hierarchy of variables (e.g. participant, session, run) as in the example below.
::
......@@ -321,3 +321,12 @@ __author__ = 'Michiel Cottaar <Michiel.Cottaar@ndcn.ox.ac.uk>'
from .filetree import FileTree, register_tree, MissingVariable
from .parse import tree_directories, list_all_trees
from .query import FileTreeQuery
import fsl.utils.deprecated as deprecated
deprecated.warn('fsl.utils.filetree',
vin='3.6.0',
rin='4.0.0',
msg='The filetree package is now released as a separate '
'Python library ("file-tree" on PyPi), and will be '
'removed in a future version of fslpy.')
......@@ -209,7 +209,7 @@ def resample(image,
np.all(np.isclose(matrix, np.eye(len(newShape) + 1))):
return data, image.voxToWorldMat
newShape = np.array(np.round(newShape), dtype=np.int)
newShape = np.array(np.round(newShape), dtype=int)
# Apply smoothing if requested,
# and if not using nn interp
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment