arthurpessa / ordpy

A Python package for data analysis with permutation entropy and ordinal network methods.
MIT License
81 stars 16 forks source link

Use the math.log function instead of np.log and np.log2 #4

Closed GuilhermeMonteiroPeixoto closed 1 year ago

GuilhermeMonteiroPeixoto commented 1 year ago

Use the math.log function instead of np.log and np.log2 because the math module is generally faster than NumPy for basic math operations.

hvribeiro commented 1 year ago

Thanks for your suggestion. We are currently working on a new release of ordpy with implementations of new methods and performance improvement, and we will consider your "pull request". However, one cannot replace np.log with math.log when dealing with arrays, such as you did in lines 568, 573, and 577. This would break our code:

image

Because of this, I am closing your "pull request".