maroba / findiff

Python package for numerical derivatives and partial differential equations in any number of dimensions.
MIT License
412 stars 59 forks source link

Recent release does not accept Numpy integers as parameters #32

Closed vnmabus closed 3 years ago

vnmabus commented 3 years ago

It seems that you have added checks like assert isinstance(order, int) recently. This prevents using Numpy integers, such as np.int32 which the code was able to handle before.

I suggest using assert isinstance(order, numbers.Integral) instead, and casting to int afterwards if you truly need to use that type (probably not).

maroba commented 3 years ago

You are right, I didn‘t think of people using numpy integers. I will fix it shortly.

maroba commented 3 years ago

Ok, I changed it, and released v0.8.7 on pypi.

vnmabus commented 3 years ago

I can confirm that the new version fixes this.