Commit 4cceeddb authored by Thomas Vincent's avatar Thomas Vincent
Browse files

Merge branch 'compat' into 'master'

Avoid numpy1.20 deprecation warnings

See merge request !133
parents 11d080e4 43208d8d
Pipeline #40989 failed with stages
in 11 minutes and 2 seconds
......@@ -4,6 +4,10 @@ Change Log
Untagged
--------
* Compatibility:
- Fixed `numpy` 1.20.0rc1 compatibility (MR: !133)
* Miscellaneous:
- Updated documentation (MR: !132)
......
......@@ -53,7 +53,7 @@ from __future__ import absolute_import, print_function, division
__authors__ = ["Jérôme Kieffer"]
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "28/02/2018"
__date__ = "30/09/2020"
__status__ = "production"
__docformat__ = 'restructuredtext'
__all__ = ["date", "version_info", "strictversion", "hexversion", "debianversion",
......@@ -85,9 +85,10 @@ version_info = _version_info(MAJOR, MINOR, MICRO, RELEV, SERIAL)
strictversion = version = debianversion = "%d.%d.%d" % version_info[:3]
if version_info.releaselevel != "final":
version += "-%s%s" % version_info[-2:]
debianversion += "~adev%i" % version_info[-1] if RELEV == "dev" else "~%s%i" % version_info[-2:]
strictversion += PRERELEASE_NORMALIZED_NAME[version_info[3]] + str(version_info[-1])
_prerelease = PRERELEASE_NORMALIZED_NAME[version_info[3]]
version += "-%s%s" % (_prerelease, version_info[-1])
debianversion += "~adev%i" % version_info[-1] if RELEV == "dev" else "~%s%i" % (_prerelease, version_info[-1])
strictversion += _prerelease + str(version_info[-1])
def calc_hexversion(major=0, minor=0, micro=0, releaselevel="dev", serial=0):
......@@ -115,6 +116,5 @@ def calc_hexversion(major=0, minor=0, micro=0, releaselevel="dev", serial=0):
hexversion = calc_hexversion(*version_info)
if __name__ == "__main__":
print(version)
......@@ -201,7 +201,7 @@ class ScanShift(object):
else:
valid_col = np.full((steps_0 * steps_1,),
True,
dtype=np.bool)
dtype=bool)
if shift_row > 0:
valid_row = row_idx < scan_params['motor_1_steps']
......@@ -210,7 +210,7 @@ class ScanShift(object):
else:
valid_row = np.full((steps_0 * steps_1,),
True,
dtype=np.bool)
dtype=bool)
valid_idx = np.where(np.logical_and(valid_row, valid_col))
......
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