<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def array_str(a, nprint=6):
 """Stringification of an array. Parameters a : `array-like` The array to print. nprint : int, optional Maximum number of elements to print per axis in ``a``. For larger arrays, a summary is printed, with ``nprint // 2`` elements on Examples -------- Printing 1D arrays: [0, 1, 2, 3] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] For 2D and higher, the ``nprint`` limitation applies per axis: [[ 0, 1, 2, 3, 4, 5], [ 6, 7, 8, 9, 10, 11], [12, 13, 14, 15, 16, 17], [18, 19, 20, 21, 22, 23]] [[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [20, 21, 22, 23], [24, 25, 26, 27], [28, 29, 30, 31]] Printing of empty arrays and 0D arrays: [] 1.0 Small deviations from round numbers will be suppressed: [ 2.] """

    a = np.asarray(a)

    max_shape = tuple(n if n < nprint else nprint for n in a.shape)
    with npy_printoptions(threshold=int(np.prod(max_shape)),
                          edgeitems=nprint // 2,
                          suppress=True):
        a_str = np.array2string(a, separator=', ')
    return a_str