Only ndim-0 arrays are treated as scalars ----------------------------------------- NumPy used to treat all arrays of size 1 (e.g., ``np.array([3.14])``) as scalars. In the future, this will be limited to arrays of ndim 0 (e.g., ``np.array(3.14)``). The following expressions will report a deprecation warning: .. code-block:: python a = np.array([3.14]) float(a) # better: a[0] to get the numpy.float or a.item() b = np.array([[3.14]]) c = numpy.random.rand(10) c[0] = b # better: c[0] = b[0, 0]