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
8122d54c
Commit
8122d54c
authored
Jun 11, 2014
by
Marco Selig
Browse files
import structure clarified.
parent
0b7fea73
Changes
4
Hide whitespace changes
Inline
Side-by-side
nifty_explicit.py
View file @
8122d54c
...
...
@@ -38,8 +38,20 @@
"""
from
__future__
import
division
#import numpy as np
from
nifty_core
import
*
#from sys import stdout as so
#import numpy as np
#import pylab as pl
#from matplotlib.colors import LogNorm as ln
#from matplotlib.ticker import LogFormatter as lf
#from multiprocessing import Pool as mp
#from multiprocessing import Value as mv
#from multiprocessing import Array as ma
#from nifty_core import about, \
# space, \
# field, \
# operator,diagonal_operator,identity,vecvec_operator, \
# probing
##-----------------------------------------------------------------------------
...
...
@@ -420,7 +432,7 @@ class explicit_operator(operator):
# if(val.size>1048576):
# about.infos.cprint("INFO: matrix size > 2 ** 20.")
else
:
raise
ValueError
(
about
.
_errors
.
cstring
(
"ERROR: dimension mismatch ( "
+
str
(
np
.
size
(
matrix
,
axis
=
None
))
+
" <> "
+
str
(
self
.
nrow
())
+
" x "
+
str
(
self
.
ncol
())
+
" )."
))
raise
ValueError
(
about
.
_errors
.
cstring
(
"ERROR: dimension mismatch ( "
+
str
(
np
.
size
(
new
matrix
,
axis
=
None
))
+
" <> "
+
str
(
self
.
nrow
())
+
" x "
+
str
(
self
.
ncol
())
+
" )."
))
## check datatype
if
(
np
.
any
(
np
.
iscomplex
(
val
))):
...
...
nifty_power.py
View file @
8122d54c
...
...
@@ -42,8 +42,12 @@
"""
from
__future__
import
division
from
scipy.interpolate
import
interp1d
as
ip
## FIXME: conflicts with sphinx's autodoc
#import numpy as np
from
nifty_core
import
*
#import numpy as np
#from nifty_core import about, \
# space, \
# field, \
# projection_operator
import
smoothing
as
gs
...
...
nifty_tools.py
View file @
8122d54c
...
...
@@ -37,8 +37,12 @@
"""
from
__future__
import
division
#import numpy as np
from
nifty_core
import
*
#import numpy as np
#from nifty_core import notification,about, \
# space, \
# field, \
# operator,diagonal_operator
##-----------------------------------------------------------------------------
...
...
smoothing.py
View file @
8122d54c
...
...
@@ -23,8 +23,8 @@
## TODO: doc strings
from
__future__
import
division
#import gfft as gf
import
numpy
as
np
#import gfft as gf
def
smooth_power
(
power
,
k
,
exclude
=
1
,
smooth_length
=
None
):
...
...
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