Skip to content

Commit

Permalink
Make times from remote-access be "well-behaved" by copying
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Jan 9, 2025
1 parent 2eabdb5 commit 94f5460
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cheta/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,12 @@ def get_time_data_from_server(h5_slice, filename):
times_all_ok = np.all(times_ok)
if not times_all_ok:
times = times[times_ok]
elif remote_access.access_remotely:
# This is really to prevent an issue in MATLAB tools where the times
# array is not "well-behaved" and causes issues in the MATLAB interface
# layer. But since remote access is almost always done with MATLAB and
# is slow, we'll just copy the array to be safe.
times = times.copy()

times_cache.update(
dict(key=cache_key, val=times, ok=times_ok, all_ok=times_all_ok)
Expand Down

0 comments on commit 94f5460

Please sign in to comment.