Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/maint/3.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Jan 27, 2020
2 parents f300524 + 864fd5e commit 6863271
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 22 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ B. Nolan Nichols <[email protected]> Nolan Nichols <[email protected]
Basile Pinsard <[email protected]> bpinsard <[email protected]>
Basile Pinsard <[email protected]> bpinsard <[email protected]>
Ben Cipollini <[email protected]> Ben Cipollini <[email protected]>
Benjamin C Darwin <[email protected]>
Bertrand Thirion <[email protected]> bthirion <[email protected]>
Cameron Riddell <[email protected]> <[email protected]>
Christian Haselgrove <[email protected]> Christian Haselgrove <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@
{
"name": "Schwartz, Yannick"
},
{
"affiliation": "Hospital for Sick Children",
"name": "Darwin, Benjamin C"
},
{
"affiliation": "INRIA",
"name": "Thirion, Bertrand",
Expand Down
18 changes: 18 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ Eric Larson (EL), Demian Wassermann, and Stephan Gerhard.

References like "pr/298" refer to github pull request numbers.

3.0.1 (Monday 27 January 2020)
==============================

Bug fixes
---------
* Test failed by using array method on tuple. (pr/860) (Ben Darwin, reviewed by
CM)
* Validate ``ExpiredDeprecationError``\s, promoted by 3.0 release from
``DeprecationWarning``\s. (pr/857) (CM)

Maintenance
-----------
* Remove logic accommodating numpy without float16 types. (pr/866) (CM)
* Accommodate new numpy dtype strings. (pr/858) (CM)


3.0.0 (Wednesday 18 December 2019)
==================================

Expand Down Expand Up @@ -66,6 +82,8 @@ Bug fixes
* Sliced ``Tractogram``s no longer ``apply_affine`` to the original
``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro,
Philippe Poulin, CM, MB)
* Change strings with invalid escapes to raw strings (pr/827) (EL, reviewed
by CM)
* Re-import externals/netcdf.py from scipy to resolve numpy deprecation
(pr/821) (CM)

Expand Down
2 changes: 1 addition & 1 deletion doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
sphinx
numpydoc
texext
matplotlib>=1.3
matplotlib >=1.3.1
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

# General information about the project.
project = u'NiBabel'
copyright = u'2006-2019, %(maintainer)s <%(author_email)s>' % metadata
copyright = u'2006-2020, %(maintainer)s <%(author_email)s>' % metadata

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ contributed code and discussion (in rough order of appearance):
* Hao-Ting Wang
* Dorota Jarecka
* Chris Gorgolewski
* Benjamin C Darwin

License reprise
===============
Expand Down
2 changes: 1 addition & 1 deletion doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Requirements
* h5py_ (optional, for MINC2 support)
* PyDICOM_ 0.9.9 or greater (optional, for DICOM support)
* `Python Imaging Library`_ (optional, for PNG conversion in DICOMFS)
* nose_ 0.11 or greater (optional, to run the tests)
* nose_ 0.11 or greater and pytest_ (optional, to run the tests)
* sphinx_ (optional, to build the documentation)

Get the development sources
Expand Down
1 change: 1 addition & 0 deletions doc/source/links_names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
.. _emacs_python_mode: http://www.emacswiki.org/cgi-bin/wiki/PythonMode
.. _doctest-mode: http://ed.loper.org/projects/doctestmode/
.. _nose: http://somethingaboutorange.com/mrl/projects/nose
.. _pytest: https://docs.pytest.org/
.. _`python coverage tester`: http://nedbatchelder.com/code/coverage/
.. _bitbucket: https://bitbucket.org
.. _six: http://pythonhosted.org/six
Expand Down
8 changes: 1 addition & 7 deletions nibabel/casting.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ def shared_range(flt_type, int_type):
# types.
# ----------------------------------------------------------------------------

try:
_float16 = np.float16
except AttributeError: # float16 not present in np < 1.6
_float16 = None


class FloatingError(Exception):
pass

Expand Down Expand Up @@ -242,7 +236,7 @@ def type_info(np_type):
minexp=info.minexp,
maxexp=info.maxexp,
width=width)
if np_type in (_float16, np.float32, np.float64,
if np_type in (np.float16, np.float32, np.float64,
np.complex64, np.complex128):
return ret
info_64 = np.finfo(np.float64)
Expand Down
12 changes: 1 addition & 11 deletions nibabel/tests/test_floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@
from nose import SkipTest
from nose.tools import assert_equal, assert_raises, assert_true, assert_false

IEEE_floats = [np.float32, np.float64]
try:
np.float16
except AttributeError: # float16 not present in np < 1.6
have_float16 = False
else:
have_float16 = True
if have_float16:
IEEE_floats.append(np.float16)
IEEE_floats = [np.float16, np.float32, np.float64]

LD_INFO = type_info(np.longdouble)

Expand Down Expand Up @@ -201,8 +193,6 @@ def test_as_int_np_fix():

def test_floor_exact_16():
# A normal integer can generate an inf in float16
if not have_float16:
raise SkipTest('No float16')
assert_equal(floor_exact(2**31, np.float16), np.inf)
assert_equal(floor_exact(-2**31, np.float16), -np.inf)

Expand Down
8 changes: 7 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ packages = find:
[options.extras_require]
dicom =
pydicom >=0.9.9
dicomfs =
%(dicom)s
pillow
dev =
gitpython
twine
Expand All @@ -52,17 +55,20 @@ doc =
texext
minc2 =
h5py
spm =
scipy
style =
flake8
test =
coverage
nose >=0.11
pytest
all =
%(dicom)s
%(dicomfs)s
%(dev)s
%(doc)s
%(minc2)s
%(spm)s
%(style)s
%(test)s

Expand Down

0 comments on commit 6863271

Please sign in to comment.