Commit 194138c4 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

nifty2go -> nifty4 part 1/n

parent a1e34940
NIFTy - Numerical Information Field Theory NIFTy - Numerical Information Field Theory
========================================== ==========================================
[![build status](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/fun_with_operators/build.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/nifty2go) [![build status](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/fun_with_operators/build.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/nifty4)
[![coverage report](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/fun_with_operators/coverage.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/nifty2go) [![coverage report](https://gitlab.mpcdf.mpg.de/ift/NIFTy/badges/fun_with_operators/coverage.svg)](https://gitlab.mpcdf.mpg.de/ift/NIFTy/commits/nifty2go)
**NIFTy** project homepage: **NIFTy** project homepage:
...@@ -83,7 +83,7 @@ The current version of Nifty3 can be obtained by cloning the repository: ...@@ -83,7 +83,7 @@ The current version of Nifty3 can be obtained by cloning the repository:
It is possible to simply install NIFTy with all its dependencies via the command It is possible to simply install NIFTy with all its dependencies via the command
pip install --user --process-dependency-links --egg git+https://gitlab.mpcdf.mpg.de/ift/NIFTy.git@nifty2go pip install --user --process-dependency-links --egg git+https://gitlab.mpcdf.mpg.de/ift/NIFTy.git@nifty4
### Running the tests ### Running the tests
...@@ -94,7 +94,7 @@ In oder to run the tests one needs two additional packages: ...@@ -94,7 +94,7 @@ In oder to run the tests one needs two additional packages:
Afterwards the tests (including a coverage report) are run using the following Afterwards the tests (including a coverage report) are run using the following
command in the repository root: command in the repository root:
nosetests -x --with-coverage --cover-html --cover-package=nifty2go nosetests -x --with-coverage --cover-html --cover-package=nifty4
### First Steps ### First Steps
......
import numpy as np import numpy as np
import nifty2go as ift import nifty4 as ift
np.random.seed(42) np.random.seed(42)
# np.seterr(all="raise",under="ignore") # np.seterr(all="raise",under="ignore")
......
import nifty2go as ift import nifty4 as ift
import numpy as np import numpy as np
if __name__ == "__main__": if __name__ == "__main__":
......
import nifty2go as ift import nifty4 as ift
from nifty2go.library.nonlinearities import Exponential from nifty4.library.nonlinearities import Exponential
import numpy as np import numpy as np
np.random.seed(42) np.random.seed(42)
......
import numpy as np import numpy as np
import nifty2go as ift import nifty4 as ift
if __name__ == "__main__": if __name__ == "__main__":
signal_to_noise = 1.5 # The signal to noise ratio signal_to_noise = 1.5 # The signal to noise ratio
......
import nifty2go as ift import nifty4 as ift
import numpy as np import numpy as np
......
import nifty2go as ift import nifty4 as ift
import numpy as np import numpy as np
np.random.seed(42) np.random.seed(42)
......
import numpy as np import numpy as np
import nifty2go as ift import nifty4 as ift
if __name__ == "__main__": if __name__ == "__main__":
......
import numpy as np import numpy as np
import nifty2go as ift import nifty4 as ift
import numericalunits as nu import numericalunits as nu
if __name__ == "__main__": if __name__ == "__main__":
......
import nifty2go as ift import nifty4 as ift
import numpy as np import numpy as np
np.random.seed(42) np.random.seed(42)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# All configuration values have a default; values that are commented out # All configuration values have a default; values that are commented out
# serve to show the default. # serve to show the default.
from nifty2go import * from nifty4 import *
import sys import sys
import os import os
......
...@@ -535,12 +535,12 @@ class Field(object): ...@@ -535,12 +535,12 @@ class Field(object):
return self._binary_helper(other, op='__ipow__') return self._binary_helper(other, op='__ipow__')
def __repr__(self): def __repr__(self):
return "<nifty2go.Field>" return "<nifty4.Field>"
def __str__(self): def __str__(self):
minmax = [self.min(), self.max()] minmax = [self.min(), self.max()]
mean = self.mean() mean = self.mean()
return "nifty2go.Field instance\n- domain = " + \ return "nifty4.Field instance\n- domain = " + \
repr(self._domain) + \ repr(self._domain) + \
"\n- val = " + repr(self.val) + \ "\n- val = " + repr(self.val) + \
"\n - min.,max. = " + str(minmax) + \ "\n - min.,max. = " + str(minmax) + \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment