[New-bugs-announce] [issue37676] cmath.phase array support

Hendrik report at bugs.python.org
Thu Jul 25 02:41:14 EDT 2019


New submission from Hendrik <jan-hendrik.mueller at 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 <report at bugs.python.org>
<https://bugs.python.org/issue37676>
_______________________________________


More information about the New-bugs-announce mailing list