Skip to content

Commit 43a82f4

Browse files
Flatten coordinate array in map_and_read_data (#237)
* Flatten coordinate array in map_and_read_data * Apply suggestions from code review * Add Changelog entry --------- Co-authored-by: Benjamin Rodenberg <benjamin.rodenberg@cit.tum.de>
1 parent c28df2b commit 43a82f4

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## latest
6+
7+
* Fix bug in `map_and_read_data` https://github.com/precice/python-bindings/pull/237
8+
59
## 3.2.0
610

711
* Update `requirements.txt` of the solver dummy https://github.com/precice/python-bindings/pull/233

cyprecice/cyprecice.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ cdef class Participant:
997997
size = coordinates.shape[0]
998998
dimensions = self.get_data_dimensions(mesh_name, data_name)
999999

1000-
cdef vector[double] cpp_coordinates = coordinates
1000+
cdef vector[double] cpp_coordinates = coordinates.flatten()
10011001
cdef vector[double] cpp_values = [-1 for _ in range(size * dimensions)]
10021002

10031003
self.thisptr.mapAndReadData (convert(mesh_name), convert(data_name), cpp_coordinates, relative_read_time, cpp_values)

0 commit comments

Comments
 (0)