Skip to content

Commit

Permalink
Updated docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ansys-akarcher committed Oct 27, 2023
1 parent 5d65d7d commit f96c1d4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/ansys/dpf/core/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ def as_local_field(self):
... for i in range(1,num_entities+1):
... f.append([[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]],i)
... f.get_entity_data(i-1),[[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]]
(array([[0.1, 0.2, 0.3],
[0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]])
(array([[0.2, 0.4, 0.6],
[0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]])
(array([[0.3, 0.6, 0.9],
[0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]])
(DPFArray([[0.1, 0.2, 0.3],
[0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]])
(DPFArray([[0.2, 0.4, 0.6],
[0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]])
(DPFArray([[0.3, 0.6, 0.9],
[0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]])
""" # noqa: E501
# Do not copy data if using InProcess server
Expand Down Expand Up @@ -864,12 +864,12 @@ class _LocalField(_LocalFieldBase, Field):
... for i in range(1,num_entities+1):
... f.append(np.array([[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]]),i)
... f.get_entity_data(i-1),[[0.1*i,0.2*i, 0.3*i],[0.1*i,0.2*i, 0.3*i]]
(array([[0.1, 0.2, 0.3],
[0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]])
(array([[0.2, 0.4, 0.6],
[0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]])
(array([[0.3, 0.6, 0.9],
[0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]])
(DPFArray([[0.1, 0.2, 0.3],
[0.1, 0.2, 0.3]]), [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]])
(DPFArray([[0.2, 0.4, 0.6],
[0.2, 0.4, 0.6]]), [[0.2, 0.4, 0.6], [0.2, 0.4, 0.6]])
(DPFArray([[0.3, 0.6, 0.9],
[0.3, 0.6, 0.9]]), [[0.30000000000000004, 0.6000000000000001, 0.8999999999999999], [0.30000000000000004, 0.6000000000000001, 0.8999999999999999]])
""" # noqa: E501

Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dpf/core/field_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def get_entity_data_by_id(self, id):
>>> stress_op = model.results.stress()
>>> fields_container = stress_op.outputs.fields_container()
>>> with fields_container[0].as_local_field() as f:
... for id in f.scoping_ids:
... for id in f.scoping.ids:
... if id < 2:
... print(f.get_entity_data_by_id(id))
[[-5.83890625e+03 -1.04498969e+05 -5.83890625e+03 2.10637354e+03
Expand Down

0 comments on commit f96c1d4

Please sign in to comment.