jjjkkkjjj / Matft

Numpy-like library in swift. (Multi-dimensional Array, ndarray, matrix and vector library)
BSD 3-Clause "New" or "Revised" License
134 stars 21 forks source link

Support for atan2 #27

Closed kkaun closed 2 years ago

kkaun commented 2 years ago

Thanks for great library!

Is there any way to get atan2 from combining 2 MfArrays? Like this:

let R = MfArray([a, b ,c])

let x = atan2((R[2, 1], R[2, 2])

The issue for us is that we're porting the code from numpy logic, and functionality like that is supported there. E.g. we can retrieve single Double from the expression like R[2, 1] so we're struggling now on how to get similar behaviour.

Thanks in advance!

jjjkkkjjj commented 2 years ago

Thank you for your feedback! Fortunately, atan2 implementation may be easy for me if i use the vvatan2 in accelerate framework. So, wait for a moment!

jjjkkkjjj commented 2 years ago

@kkaun I've just implemented arctan2 like numpy.arctan2! Check the latest Matft!

kkaun commented 2 years ago

@jjjkkkjjj thank you very much!