Skip to content

Commit

Permalink
non-copying operation to improve speed for large matrices (useful for…
Browse files Browse the repository at this point in the history
… 3D simulation) (#269)
  • Loading branch information
guillefix authored Jan 18, 2024
1 parent 9f57fbb commit e31e0ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kwave/utils/matlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def matlab_assign(matrix: np.ndarray, indices: Union[int, np.ndarray],
"""
original_shape = matrix.shape
matrix = matrix.flatten(order='F')
matrix = np.ravel(matrix, order='F')
matrix[indices] = values
return matrix.reshape(original_shape, order='F')

Expand Down

0 comments on commit e31e0ed

Please sign in to comment.