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
ift
NIFTy
Commits
914f053a
Commit
914f053a
authored
Dec 05, 2019
by
Martin Reinecke
Browse files
cleanup
parent
46021a81
Pipeline
#64987
passed with stages
in 8 minutes and 29 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/data_objects/__init__.py
deleted
100644 → 0
View file @
46021a81
nifty6/data_objects/numpy_do.py
deleted
100644 → 0
View file @
46021a81
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2019 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
# Data object module that uses simple numpy ndarrays.
import
numpy
as
np
#from numpy import ndarray as data_object
#from numpy import empty, empty_like, ones, zeros, full
#from numpy import absolute, sign, clip, vdot
#from numpy import sin, cos, sinh, cosh, tan, tanh
#from numpy import exp, log, log10, sqrt, sinc, log1p, expm1
from
.random
import
Random
def
from_random
(
random_type
,
shape
,
dtype
=
np
.
float64
,
**
kwargs
):
generator_function
=
getattr
(
Random
,
random_type
)
return
generator_function
(
dtype
=
dtype
,
shape
=
shape
,
**
kwargs
)
nifty6/dobj.py
deleted
100644 → 0
View file @
46021a81
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-2019 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
from
.data_objects.numpy_do
import
*
nifty6/field.py
View file @
914f053a
...
...
@@ -140,11 +140,11 @@ class Field(object):
Field
The newly created Field.
"""
from
.
import
dobj
from
.
random
import
Random
domain
=
DomainTuple
.
make
(
domain
)
return
Field
(
domain
=
domain
,
val
=
dobj
.
from_random
(
random_
type
,
dtype
=
dtype
,
shape
=
domain
.
shape
,
**
kwargs
)
)
generator_function
=
getattr
(
Random
,
random_type
)
arr
=
generator_function
(
d
type
=
dtype
,
shape
=
domain
.
shape
,
**
kwargs
)
return
Field
(
domain
,
arr
)
@
property
def
val
(
self
):
...
...
nifty6/
data_objects/
random.py
→
nifty6/random.py
View file @
914f053a
File moved
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