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
5dd84a69
Commit
5dd84a69
authored
Jun 17, 2019
by
Daniel Boeckenhoff
Committed by
Daniel Boeckenhoff
Mar 18, 2020
Browse files
numpy vs 1.11.3 compatibility
parent
7fd40859
Changes
1
Hide whitespace changes
Inline
Side-by-side
tfields/core.py
View file @
5dd84a69
...
...
@@ -1550,7 +1550,7 @@ class TensorFields(Tensors):
Masking
>>> masked = scalar_field[[True, False, True]]
>>> masked = scalar_field[
np.array(
[True, False, True]
)
]
>>> assert masked.equal([[0, 0, 0], [0, -1, 0]])
>>> assert masked.fields[0].equal([42, 10.5])
>>> assert masked.fields[1].equal([1, 3])
...
...
@@ -1817,7 +1817,7 @@ class TensorMaps(TensorFields):
Masking
>>> masked = mesh[[True, False, True, True, True]]
>>> masked = mesh[
np.array(
[True, False, True, True, True]
)
]
>>> assert masked.equal([[0, 0, 0], [0, -1, 0], [1, 1, 1], [-1, -1, -1]])
>>> assert masked.fields[0].equal([42, 10.5, 1, 1])
>>> assert masked.fields[1].equal([1, 3, 3, 3])
...
...
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