I have been building math tools in Python without numpy and am wondering if I have to use numpy to do more than add and subtract using the complex numbers built into Python.
I've tried just plugging the complex command into my functions, for example:
import math
def f(a, b):
return math.cos(complex(a, b))
print(f(1, 1))
and it won't calculate it.
source https://stackoverflow.com/questions/76249593/making-the-complexa-b-command-work-with-functions-from-the-math-module
Comments
Post a Comment