If `arr` is just a list or a tuple and not a numpy array this will raise an exception. It's your call whether you want to check and force `arr` to be a `numpy.ndarray` beforehand ...