News for hackers. Stuff that matters.
Re:GNU Octave: A high-level interactive language for numeric... by sampo on Saturday January 19, 2019 @10:27AM (#18947469)
Matlab:

    exp(-i*pi*[0 0.5 1])
Python:

    import cmath
    import numpy as np
    np.exp(-1j*cmath.pi*np.array([0, 0.5, 1]))
Note that you can't use math.exp for complex numbers, and neither math.exp nor cmath.exp works for arrays, you need the separate np.exp. Also, while np.exp actually works on lists, the multiplication doesn't, so you need to keep in mind which variables are python lists (that you mostly cannot do arithmetic on) and which are numpy arrays.

When you are experienced in Python, you know these differences by heart. But if you are a domain specialist and want to test an idea quickly, you will see lots of TypeError messages from Python, you need to google manuals to sort it out, and it will slow you down 10x.

Re:GNU Octave: A high-level interactive language for numeric... by kryptk on Sunday January 20, 2019 @12:22AM (#18951324)
None of what you said is wrong, but:

1) there is no need to import anything but numpy to get at pi or e (see constant section of numpy docs).

2) if you wrap all your things you expect to behave like vectors/matrices with np.array() and only use np methods to operate on them you will suffer from shape mismatches instead of TypeErrors, a slightly better fate.