diff --git a/deepcell_spots/decoding_functions.py b/deepcell_spots/decoding_functions.py index 55881ce..854ddcb 100644 --- a/deepcell_spots/decoding_functions.py +++ b/deepcell_spots/decoding_functions.py @@ -96,7 +96,7 @@ class MatrixSquareRoot(Function): """ @staticmethod def forward(ctx, input): - m = input.detach().cpu().numpy().astype(np.float_) + m = input.detach().cpu().numpy().astype(np.float64) sqrtm = torch.from_numpy(scipy.linalg.sqrtm(m).real).to(input) ctx.save_for_backward(sqrtm) return sqrtm @@ -106,8 +106,8 @@ def backward(ctx, grad_output): grad_input = None if ctx.needs_input_grad[0]: sqrtm, = ctx.saved_tensors - sqrtm = sqrtm.data.cpu().numpy().astype(np.float_) - gm = grad_output.data.cpu().numpy().astype(np.float_) + sqrtm = sqrtm.data.cpu().numpy().astype(np.float64) + gm = grad_output.data.cpu().numpy().astype(np.float64) # Given a positive semi-definite matrix X, # since X = X^{1/2}X^{1/2}, we can compute the gradient of the diff --git a/deepcell_spots/utils/augmentation_utils.py b/deepcell_spots/utils/augmentation_utils.py index 78da73d..6afe6da 100644 --- a/deepcell_spots/utils/augmentation_utils.py +++ b/deepcell_spots/utils/augmentation_utils.py @@ -29,7 +29,7 @@ import numpy as np from keras_preprocessing.image.affine_transformations import \ transform_matrix_offset_center -from scipy.ndimage.morphology import distance_transform_edt +from scipy.ndimage import distance_transform_edt def subpixel_distance_transform(point_list, image_shape, dy=1, dx=1): diff --git a/requirements.txt b/requirements.txt index a975c32..add555c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ pandas<2 -numpy>=1.16.6 -scipy>=1.2.3,<2 +numpy +scipy<2 scikit-image>=0.19.3 scikit-learn tensorflow~=2.8.0 # manually matched to deepcell-tf diff --git a/setup.py b/setup.py index 00efd5f..aaab05e 100644 --- a/setup.py +++ b/setup.py @@ -53,8 +53,8 @@ long_description_content_type='text/markdown', install_requires=[ 'pandas<2', - 'numpy>=1.16.6', - 'scipy>=1.2.3,<2', + 'numpy', + 'scipy<2', 'scikit-image>=0.19.3', 'scikit-learn', 'tensorflow~=2.8.0',