Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
fa704595
Commit
fa704595
authored
Sep 19, 2018
by
Martin Reinecke
Browse files
try to fix pickling
parent
1deb0df3
Changes
1
Show whitespace changes
Inline
Side-by-side
nifty5/operators/harmonic_operators.py
View file @
fa704595
...
@@ -289,6 +289,11 @@ class SHTOperator(LinearOperator):
...
@@ -289,6 +289,11 @@ class SHTOperator(LinearOperator):
else
:
else
:
self
.
sjob
.
set_Healpix_geometry
(
target
.
nside
)
self
.
sjob
.
set_Healpix_geometry
(
target
.
nside
)
def
__reduce__
(
self
):
print
(
"reduce"
)
return
(
_unpickleSHTOperator
,
(
list
(
self
.
_domain
),
self
.
_target
[
self
.
_space
],
self
.
_space
))
def
apply
(
self
,
x
,
mode
):
def
apply
(
self
,
x
,
mode
):
self
.
_check_input
(
x
,
mode
)
self
.
_check_input
(
x
,
mode
)
if
utilities
.
iscomplextype
(
x
.
dtype
):
if
utilities
.
iscomplextype
(
x
.
dtype
):
...
@@ -337,6 +342,11 @@ class SHTOperator(LinearOperator):
...
@@ -337,6 +342,11 @@ class SHTOperator(LinearOperator):
return
Field
(
tdom
,
dobj
.
ensure_default_distributed
(
odat
))
return
Field
(
tdom
,
dobj
.
ensure_default_distributed
(
odat
))
def
_unpickleSHTOperator
(
*
args
):
print
(
"unpickle"
)
return
SHTOperator
(
*
args
)
class
HarmonicTransformOperator
(
LinearOperator
):
class
HarmonicTransformOperator
(
LinearOperator
):
"""Transforms between a harmonic domain and a position domain counterpart.
"""Transforms between a harmonic domain and a position domain counterpart.
...
...
Write
Preview
Markdown
is supported
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