Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
kmap
xsocs
Commits
4cceeddb
Commit
4cceeddb
authored
Dec 07, 2020
by
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
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.rst
View file @
4cceeddb
...
@@ -4,6 +4,10 @@ Change Log
...
@@ -4,6 +4,10 @@ Change Log
Untagged
Untagged
--------
--------
* Compatibility:
- Fixed `numpy` 1.20.0rc1 compatibility (MR: !133)
* Miscellaneous:
* Miscellaneous:
- Updated documentation (MR: !132)
- Updated documentation (MR: !132)
...
...
version.py
View file @
4cceeddb
...
@@ -53,7 +53,7 @@ from __future__ import absolute_import, print_function, division
...
@@ -53,7 +53,7 @@ from __future__ import absolute_import, print_function, division
__authors__
=
[
"Jérôme Kieffer"
]
__authors__
=
[
"Jérôme Kieffer"
]
__license__
=
"MIT"
__license__
=
"MIT"
__copyright__
=
"European Synchrotron Radiation Facility, Grenoble, France"
__copyright__
=
"European Synchrotron Radiation Facility, Grenoble, France"
__date__
=
"
28
/0
2
/20
18
"
__date__
=
"
30
/0
9
/20
20
"
__status__
=
"production"
__status__
=
"production"
__docformat__
=
'restructuredtext'
__docformat__
=
'restructuredtext'
__all__
=
[
"date"
,
"version_info"
,
"strictversion"
,
"hexversion"
,
"debianversion"
,
__all__
=
[
"date"
,
"version_info"
,
"strictversion"
,
"hexversion"
,
"debianversion"
,
...
@@ -85,9 +85,10 @@ version_info = _version_info(MAJOR, MINOR, MICRO, RELEV, SERIAL)
...
@@ -85,9 +85,10 @@ version_info = _version_info(MAJOR, MINOR, MICRO, RELEV, SERIAL)
strictversion
=
version
=
debianversion
=
"%d.%d.%d"
%
version_info
[:
3
]
strictversion
=
version
=
debianversion
=
"%d.%d.%d"
%
version_info
[:
3
]
if
version_info
.
releaselevel
!=
"final"
:
if
version_info
.
releaselevel
!=
"final"
:
version
+=
"-%s%s"
%
version_info
[
-
2
:]
_prerelease
=
PRERELEASE_NORMALIZED_NAME
[
version_info
[
3
]]
debianversion
+=
"~adev%i"
%
version_info
[
-
1
]
if
RELEV
==
"dev"
else
"~%s%i"
%
version_info
[
-
2
:]
version
+=
"-%s%s"
%
(
_prerelease
,
version_info
[
-
1
])
strictversion
+=
PRERELEASE_NORMALIZED_NAME
[
version_info
[
3
]]
+
str
(
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
):
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):
...
@@ -115,6 +116,5 @@ def calc_hexversion(major=0, minor=0, micro=0, releaselevel="dev", serial=0):
hexversion
=
calc_hexversion
(
*
version_info
)
hexversion
=
calc_hexversion
(
*
version_info
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
print
(
version
)
print
(
version
)
xsocs/process/shift/shift.py
View file @
4cceeddb
...
@@ -201,7 +201,7 @@ class ScanShift(object):
...
@@ -201,7 +201,7 @@ class ScanShift(object):
else
:
else
:
valid_col
=
np
.
full
((
steps_0
*
steps_1
,),
valid_col
=
np
.
full
((
steps_0
*
steps_1
,),
True
,
True
,
dtype
=
np
.
bool
)
dtype
=
bool
)
if
shift_row
>
0
:
if
shift_row
>
0
:
valid_row
=
row_idx
<
scan_params
[
'motor_1_steps'
]
valid_row
=
row_idx
<
scan_params
[
'motor_1_steps'
]
...
@@ -210,7 +210,7 @@ class ScanShift(object):
...
@@ -210,7 +210,7 @@ class ScanShift(object):
else
:
else
:
valid_row
=
np
.
full
((
steps_0
*
steps_1
,),
valid_row
=
np
.
full
((
steps_0
*
steps_1
,),
True
,
True
,
dtype
=
np
.
bool
)
dtype
=
bool
)
valid_idx
=
np
.
where
(
np
.
logical_and
(
valid_row
,
valid_col
))
valid_idx
=
np
.
where
(
np
.
logical_and
(
valid_row
,
valid_col
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment