Skip to content

Commit

Permalink
Fix array-to-float bug
Browse files Browse the repository at this point in the history
Fix for array-to-float bug (new numpy deprecation)
  • Loading branch information
0todd0000 committed Jan 14, 2024
1 parent e4528ba commit 85d8b3b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name = 'spm1d',
version = '0.4.23',
version = '0.4.24',
description = 'One-Dimensional Statistical Parametric Mapping',
author = 'Todd Pataky',
author_email = '[email protected]',
Expand Down
4 changes: 2 additions & 2 deletions spm1d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
probabilities in Python, Journal of Statistical Software, in press.
Copyright (C) 2023 Todd Pataky
Copyright (C) 2024 Todd Pataky
'''


__version__ = '0.4.23 (2023-12-28)'
__version__ = '0.4.24 (2024-01-14)'


__all__ = ['data', 'io', 'plot', 'rft1d', 'stats', 'util']
Expand Down
2 changes: 1 addition & 1 deletion spm1d/rft1d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'''


__version__ = '0.1.4 spm1d' #(2016.10.01)
__version__ = '0.1.5 spm1d' #(2024.01.14)

from . import data, distributions, geom, prob, random

Expand Down
2 changes: 1 addition & 1 deletion spm1d/rft1d/prob.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def _as_float(x):
def _float_if_possible(x):
if isinstance(x, np.ndarray):
if x.size==1:
return float(x)
return float( x.ravel()[0] )
else:
return x
else:
Expand Down

0 comments on commit 85d8b3b

Please sign in to comment.