Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support preCICE Waveform API #146

Closed
6 changes: 3 additions & 3 deletions cyprecice/cyprecice.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ cdef class Interface:
"""
dimensions = self.get_dimensions()
cdef np.ndarray[double, ndim=1] _value = np.empty(dimensions, dtype=np.double)
if relative_read_time == None:
if relative_read_time is None:
self.thisptr.readVectorData (data_id, vertex_id, <double*>_value.data)
else:
self.thisptr.readVectorData (data_id, vertex_id, relative_read_time, <double*>_value.data)
Expand Down Expand Up @@ -1004,7 +1004,7 @@ cdef class Interface:
cdef np.ndarray[int, ndim=1] _vertex_ids = np.ascontiguousarray(vertex_ids, dtype=np.int32)
size = _vertex_ids.size
cdef np.ndarray[double, ndim=1] _values = np.empty(size, dtype=np.double)
if relative_read_time == None:
if relative_read_time is None:
self.thisptr.readBlockScalarData (data_id, size, <const int*>_vertex_ids.data, <double*>_values.data)
else:
self.thisptr.readBlockScalarData (data_id, size, <const int*>_vertex_ids.data, relative_read_time, <double*>_values.data)
Expand Down Expand Up @@ -1042,7 +1042,7 @@ cdef class Interface:
>>> value = interface.read_scalar_data(data_id, vertex_id)
"""
cdef double _value
if relative_read_time == None:
if relative_read_time is None:
self.thisptr.readScalarData (data_id, vertex_id, _value)
else:
self.thisptr.readScalarData (data_id, vertex_id, relative_read_time, _value)
Expand Down