Skip to content
GitLab
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
903a87c6
Commit
903a87c6
authored
Jul 01, 2016
by
theos
Browse files
Corrected class names of field types.
parent
cb38a0ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
903a87c6
...
...
@@ -50,11 +50,15 @@ from nifty_paradict import space_paradict,\
point_space_paradict
,
\
nested_space_paradict
from
field_types
import
Field
_t
ype
,
\
Field
_a
rray
from
field_types
import
Field
T
ype
,
\
Field
A
rray
from
operators
import
*
from
power
import
PowerSpace
,
\
RGPowerSpace
,
\
LMPowerSpace
## optional submodule `rg`
try
:
from
rg
import
rg_space
,
\
...
...
field_types/__init__.py
View file @
903a87c6
# -*- coding: utf-8 -*-
from
field_array
import
Field_type
,
\
Field_array
\ No newline at end of file
from
field_array
import
FieldType
,
\
FieldArray
\ No newline at end of file
field_types/base_field_type.py
View file @
903a87c6
...
...
@@ -3,7 +3,7 @@
import
numpy
as
np
class
Field
_t
ype
(
object
):
class
Field
T
ype
(
object
):
def
__init__
(
self
,
shape
,
dtype
):
try
:
new_shape
=
tuple
([
int
(
i
)
for
i
in
shape
])
...
...
field_types/field_array.py
View file @
903a87c6
# -*- coding: utf-8 -*-
from
base_field_type
import
Field
_t
ype
from
base_field_type
import
Field
T
ype
class
Field
_a
rray
(
Field
_t
ype
):
class
Field
A
rray
(
Field
T
ype
):
def
dot_contraction
(
self
,
x
,
axes
):
return
x
.
sum
(
axis
=
axes
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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