So, what im trying to do is get certain numbers from certain positions in a array of a given > range and put them into an equation
yy = arange(4)
xx = arange(5)
Area = ((xx[2] - xx[1])(yy[2] + yy[1])) / 2
I try to run it and I get this..
----> ((xx[2] - xx[1])(yy[2] + yy[1])) / 2
TypeError: 'numpy.int64' object is not callable
I get error.. how can I use certain numbers in an array and put them into an equation?
Python does not follow the same rules as written math. You must explicitly indicate multiplication.
(a)(b)
(unless a
is a function)
(a) * (b)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With