Skip to content

BUG: Allow types np.integer and np.floating#127

Merged
Leengit merged 1 commit intoDigitalSlideArchive:masterfrom
Leengit:isinstance
Apr 21, 2023
Merged

BUG: Allow types np.integer and np.floating#127
Leengit merged 1 commit intoDigitalSlideArchive:masterfrom
Leengit:isinstance

Conversation

@Leengit
Copy link
Collaborator

@Leengit Leengit commented Apr 21, 2023

Where we check for

isinstance(my_variable, int)

instead also allow numpy.integer

isinstance(my_variable, (int, np.integer))

Similarly allow numpy.floating when float is the checked type.

Closes #125.

@Leengit Leengit added the bug Something isn't working label Apr 21, 2023
@Leengit Leengit self-assigned this Apr 21, 2023
@Leengit Leengit merged commit 7a4a173 into DigitalSlideArchive:master Apr 21, 2023
@Leengit Leengit deleted the isinstance branch April 21, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

numpy ints fail isinstance(x, int)

1 participant