Skip to content

Commit

Permalink
json reading reshaping clear
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiushin committed Sep 5, 2024
1 parent 9e7b5a3 commit ae93aa6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions deker_server_adapters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,7 @@ def read_data(
message=f"Timeout on {self.type.name} read {array}",
)

data = response.json # type: ignore[call-overload]
if isinstance(data, list):
data = np.array(data, dtype=array.dtype)
np_array = np.array(data).reshape(array.shape)
else:
np_array = data
data = response.json() # type: ignore[call-overload]

return np_array

Expand Down

0 comments on commit ae93aa6

Please sign in to comment.