Add custom formatting of complex numbers for Numpy/Native.

Numpy formatting in python prints complex numbers as 1.+2.j, rather than (1, 2). Here we simplify as just 1+2j, which is at least copy-paste-able into numpy.

Similarly, for Native, we format complex numbers as {1, 2}, so that it can be copy-pasted and treated as a complex constructor.

Fixes #2545 (closed).

Merge request reports

Loading