Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
postpic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LabAstro
postpic
Commits
c88a578e
Commit
c88a578e
authored
Nov 22, 2017
by
Alexander Blinne
Browse files
Options
Downloads
Patches
Plain Diff
Fix wrapping for methods in python2
parent
0405b694
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
postpic/datahandling.py
+8
-3
8 additions, 3 deletions
postpic/datahandling.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
9 additions
and
4 deletions
postpic/datahandling.py
+
8
−
3
View file @
c88a578e
...
...
@@ -41,7 +41,8 @@ o o o o o o grid_node (coordinates of grid cell boundaries)
"""
from
__future__
import
absolute_import
,
division
,
print_function
,
unicode_literals
import
functools
import
sys
import
collections
import
copy
import
warnings
...
...
@@ -56,6 +57,12 @@ import scipy.signal as sps
import
numexpr
as
ne
from
._compat
import
tukey
,
meshgrid
,
broadcast_to
,
NDArrayOperatorsMixin
from
.
import
helper
if
sys
.
version
[
0
]
==
'
2
'
:
import
functools32
as
functools
else
:
import
functools
try
:
import
psutil
...
...
@@ -100,7 +107,6 @@ try:
except
ImportError
:
unwrap_phase
=
None
from
.
import
helper
__all__
=
[
'
Field
'
,
'
Axis
'
]
...
...
@@ -303,7 +309,6 @@ def _reducing_numpy_method(method):
This function produces methods that are suitable for the `Field` class
that reproduce the behaviour of the corresponding numpy `method`
"""
@functools.wraps
(
getattr
(
np
.
ndarray
,
method
))
def
new_method
(
self
,
axis
=
None
,
out
=
None
,
keepdims
=
None
,
**
kwargs
):
# we need to interpret the axis object and create an iterable axisiter
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
c88a578e
...
...
@@ -38,7 +38,7 @@ setup(name='postpic',
license
=
'
GPLv3+
'
,
setup_requires
=
[
'
cython>=0.18
'
],
install_requires
=
[
'
matplotlib
'
,
'
numpy>=1.8
'
,
'
scipy
'
,
'
future
'
,
'
urllib3
'
,
'
numexpr
'
,
'
cython>=0.18
'
],
'
cython>=0.18
'
,
'
functools32;python_version<
"
3.0
"'
],
extras_require
=
{
'
h5 reader for openPMD support
'
:
[
'
h5py
'
],
'
sdf support for EPOCH reader
'
:
[
'
sdf
'
]},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment