python - Certain trigonometry packages from numpy -


i'm writing code solves intersection of few functions involve cos , sin , other various trig functions in python.

but feel importing numpy whole of load on such small program, there other way basic trig functions , pi, without importing whole or specifying

from numpy import cos numpy import sin ... 

the easiest , economical way this?

sin, cos, , pi in math module. just:

from math import sin, cos, pi 

no numpy required.

if you're using sin , cos on numpy arrays, it's better use numpy version, otherwise, ones math module good.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -