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
2 changes: 1 addition & 1 deletion hsds/attr_sn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ async def PUT_AttributeValue(request):
msg += f"but got {len(binary_data)}"
log.warn(msg)
raise HTTPBadRequest(reason=msg)
arr = np.fromstring(binary_data, dtype=np_dtype)
arr = np.frombuffer(binary_data, dtype=np_dtype)
if attr_shape["class"] == "H5S_SCALAR":
arr = arr.reshape([])
else:
Expand Down
4 changes: 2 additions & 2 deletions hsds/chunk_sn.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ async def PUT_Value(request):
log.warn(msg)
raise HTTPBadRequest(reason=msg)

arr = np.fromstring(input_data, dtype=dset_dtype)
arr = np.frombuffer(input_data, dtype=dset_dtype)
log.debug(f"read fixed type array: {arr}")

if bc_shape:
Expand Down Expand Up @@ -1351,7 +1351,7 @@ async def POST_Value(request):
log.warn(msg)
raise HTTPBadRequest(reason=msg)
num_points = request.content_length // point_dt.itemsize
points = np.fromstring(binary_data, dtype=point_dt)
points = np.frombuffer(binary_data, dtype=point_dt)
# reshape the data based on the rank (num_points x rank)
if rank > 1:
if len(points) % rank != 0:
Expand Down
Loading