Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/iris/fileformats/pp.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,10 @@ def _data_bytes_to_shaped_array(data_bytes, lbpack, boundary_packing,
raise iris.exceptions.NotYetImplementedError(
'PP fields with LBPACK of %s are not yet supported.' % lbpack)

# Ensure we have write permission on the data buffer.
data.setflags(write=True)
# Ensure we have a writeable data buffer.
# NOTE: "data.setflags(write=True)" is not valid for numpy >= 1.16.0.
if not data.flags['WRITEABLE']:
data = data.copy()

# Ensure the data is in the native byte order
if not data.dtype.isnative:
Expand Down
2 changes: 1 addition & 1 deletion requirements/core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cartopy
#conda: proj4<5
cf_units>=2
cftime!=1.0.2.1
cftime==1.0.1
dask[array] #conda: dask
matplotlib>=2,<3
netcdf4
Expand Down