lingpy / lingpy3

LingPy 3.0
GNU General Public License v3.0
1 stars 2 forks source link

Need numpy just for sqrt? #8

Closed SimonGreenhill closed 7 years ago

SimonGreenhill commented 7 years ago

Just spotted this as the build is failing because travis isn't installing numpy. I was going to fix this but, it seems that the code so far is only using numpy in here and just for sqrt.

There's an implementation of sqrt in the stdlib (math.sqrt). Does numpy.sqrt have advantages? is numpy going to be used elsewhere? if not we could remove numpy as a prerequisite?

SimonGreenhill commented 7 years ago

And apparently math.sqrt is faster than numpy.sqrt for scalar floats.

LinguList commented 7 years ago

nope, this is great, I want to get completely rid of numpy, as it is just introducing errors, and now that networkx is also working without numpy, this is even easier. Earlier, in the old wordlist, I had a numpy-array tracking the concepts, but @xrotwang's new construct doesn't have these, so we can finally say bye-bye to numpy for the core behaviour (we might need it, as well as scipy, for other things, but not in the core packages for normal users and normal apps).