Skip to content

Commit

Permalink
bugfix: arr.nd is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Apr 8, 2020
1 parent 26f0e9d commit d3a83e4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/imops.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@ def mono8_to_rgb8(const np.uint8_t[:, :] arr,skip_check=False):
do_check = not skip_check

if do_check:
if arr.nd != 2:
if arr.ndim != 2:
raise ValueError("only 2D arrays are accepted (currently) mono8")

if arr.dtype != np.uint8:
raise TypeError("must be uint8 arrays")

height = arr.shape[0]
width = arr.shape[1]

Expand Down

0 comments on commit d3a83e4

Please sign in to comment.