Skip to content

Commit

Permalink
only copy numpy array in ak.array if its rank is larger than 1 (Bears…
Browse files Browse the repository at this point in the history
…-R-Us#3826)

Signed-off-by: Jeremiah Corrado <[email protected]>
  • Loading branch information
jeremiah-corrado authored Oct 9, 2024
1 parent a1e2bd4 commit 828e612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arkouda/pdarraycreation.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def array(
raise RuntimeError(
"Array exceeds allowed transfer size. Increase ak.client.maxTransferBytes to allow"
)
if a.flags["F_CONTIGUOUS"] and not a.flags["OWNDATA"]:
if a.ndim > 1 and a.flags["F_CONTIGUOUS"] and not a.flags["OWNDATA"]:
# Make a copy if the array was shallow-transposed (to avoid error #3757)
a_ = a.copy()
else:
Expand Down

0 comments on commit 828e612

Please sign in to comment.