Skip to content

Commit

Permalink
Merge pull request #1207 from OceanParcels/fix_deprecwarning_ndarrayf…
Browse files Browse the repository at this point in the history
…romraggednestedsequences

Fixing numpy deprecationwarning in timeslices concatenation
  • Loading branch information
erikvansebille committed Aug 2, 2022
2 parents d7b3848 + 7541a07 commit 04485b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions parcels/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,8 @@ def collect_timeslices(timestamps, data_filenames, _grid_fb_class, dimensions, i
ftime = filebuffer.time
timeslices.append(ftime)
dataFiles.append([fname] * len(ftime))
timeslices = np.array(timeslices)
time = np.concatenate(timeslices)
dataFiles = np.concatenate(np.array(dataFiles))
time = np.concatenate(timeslices).ravel()
dataFiles = np.concatenate(dataFiles).ravel()
if time.size == 1 and time[0] is None:
time[0] = 0
time_origin = TimeConverter(time[0])
Expand Down

0 comments on commit 04485b2

Please sign in to comment.