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
Daniel Boeckenhoff
tfields
Commits
5069715e
Commit
5069715e
authored
Jul 04, 2018
by
Daniel Boeckenhoff
Browse files
tfields.Mesh3D cutting works - except for templates on fields
parent
07604102
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
tfields/core.py
View file @
5069715e
...
...
@@ -388,6 +388,9 @@ class Tensors(AbstractNdarray):
tensors
=
np
.
empty
(
tensors
.
shape
,
dtype
=
tensors
.
dtype
)
elif
dim
is
not
None
:
tensors
=
np
.
empty
((
0
,
dim
))
if
issubclass
(
type
(
tensors
),
np
.
ndarray
):
# np.empty
pass
else
:
raise
ValueError
(
"Empty tensors need dimension "
"parameter 'dim'."
)
...
...
@@ -1454,10 +1457,11 @@ class TensorMaps(TensorFields):
dims
.
append
(
map_field
.
dim
)
else
:
maps
[
mp_idx
]
=
TensorFields
.
merged
(
maps
[
mp_idx
],
map_field
)
kwargs
[
'maps'
]
=
maps
#
kwargs['maps'] = maps
obj
=
super
(
TensorMaps
,
cls
).
merged
(
*
objects
,
**
kwargs
)
return
cls
.
__new__
(
cls
,
obj
,
maps
=
maps
)
inst
=
super
(
TensorMaps
,
cls
).
merged
(
*
objects
,
**
kwargs
)
inst
=
cls
.
__new__
(
cls
,
inst
,
maps
=
maps
)
return
inst
def
equal
(
self
,
other
,
**
kwargs
):
"""
...
...
tfields/lib/__init__.py
View file @
5069715e
...
...
@@ -108,3 +108,4 @@ else:
from
.grid
import
igrid
from
.
import
stats
from
.stats
import
mode
,
median
,
mean
from
.
import
symbolics
tfields/mesh3D.py
View file @
5069715e
This diff is collapsed.
Click to expand it.
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