New submission from Hendrik <jan-hendrik.muel...@gmx.net>:

It would be nice if cmath.phase supports arrays like this: 
```
import cmath
import numpy as np

z=255*np.ones((3,3)) * np.exp(1j * np.pi*np.ones((3,3)))

def get_k_amp_array(z):
    return abs(z)

def get_k_ph_array(z):
    return np.array([[cmath.phase(z_row) for z_row in z_col] for z_col in z ])

amp_array=  get_k_amp_array(z)
ph_array=   get_k_ph_array(z)

print(amp_array)
print(ph_array)
```

----------
components: Library (Lib)
messages: 348428
nosy: kolibril13
priority: normal
severity: normal
status: open
title: cmath.phase array support
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37676>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to