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
Post a Comment