Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
13
Merge Requests
13
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
914f053a
Commit
914f053a
authored
Dec 05, 2019
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
5 changed files
with
4 additions
and
54 deletions
+4
-54
nifty6/data_objects/__init__.py
nifty6/data_objects/__init__.py
+0
-0
nifty6/data_objects/numpy_do.py
nifty6/data_objects/numpy_do.py
+0
-32
nifty6/dobj.py
nifty6/dobj.py
+0
-18
nifty6/field.py
nifty6/field.py
+4
-4
nifty6/random.py
nifty6/random.py
+0
-0
No files found.
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
(
dtype
=
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
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