Skip to content

Commit

Permalink
fix: change np.integer to numbers.Integral (#3195)
Browse files Browse the repository at this point in the history
* fix: change np.integer to numbers.Integral in ak_from_buffers to make it more general

* fix: remove usage of numbers package
  • Loading branch information
maxgalli authored Aug 1, 2024
1 parent 55a9a43 commit 85a1535
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/awkward/operations/ak_from_buffers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,9 @@ def _impl(
elif isinstance(form, dict):
form = ak.forms.from_dict(form)

if isinstance(length, np.integer):
length = int(length)

if not (is_integer(length) and length >= 0):
raise TypeError("'length' argument must be a non-negative integer")
length = int(length)

if not isinstance(form, ak.forms.Form):
raise TypeError(
Expand Down

0 comments on commit 85a1535

Please sign in to comment.