+
   u                       R t ^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RI	H
t
 ^ RIHtHtHtHtHtHt ^ RIHt ]P(                  ]P*                  ]P,                  ]P.                  ]P0                  ]P2                  ]P4                  ]P6                  ]P8                  ]P:                  ]P<                  ]P>                  ] .t!. t"]! F  t#R F  t$]PJ                  ! ]#4      PM                  ]$4      t%]PN                  ! R4      PQ                  ]%4      t)]"PU                  ]PV                  ! . ]%R7      ]PV                  ! ^
]%R7      ])])PY                  Ra4      ])PY                  Ra4      PZ                  ])PY                  Ra4      RRRb1R	3,          .4       K  	  K  	  . RgOt.^^.RR.RR..^3^^.RR.RR..^	3.t/RdRRhRiR. RkO3RjRl.3RmRRnRo.3ReRf.t0^^.RRRRR.RR.^^.3RR3RRpRR.RR..^3^^.RRRRR.RR.^^.3RR3RRqRR.RR..^	3.t1]PV                  ! ]/]PJ                  ! ].4      PM                  R4      R7      ]PV                  ! ]1]PJ                  ! ]04      PM                  R4      R7      ]PV                  ! ]/]PJ                  ! ].4      PM                  R 4      R7      ]PV                  ! ]1]PJ                  ! ]04      PM                  R 4      R7      ]Pd                  ! ^Rs.R7      .t3 ! R" R#]4      t4R$ t5R% t6R& t7R' t8R( t9R) t:R* t;R+ t<R, t=]P|                  P                  ]R-R.7      ]P|                  P                  R/ 4       4       tAR0 tB]PJ                  ! R1RR27      tC]PJ                  ! R3R4R5.R6RR.R7^^./4      tD]PJ                  ! R3R!R8.R6R]D./4      tE]PJ                  ! R3. RtOR6R.^,          /4      tF]PJ                  ! R3R4R5.R6RR.R7^^.R9R:R;./4      tG]PJ                  ! R3. R6. R<^/4      tH]P|                  P                  R=]C]D]E]F]G]H.4      R> 4       tJ]P|                  P                  R?4      R@ 4       tLRA tM]P|                  P                  R=]PJ                  ! R4]P*                  3R5]P.                  3R!]P2                  3.RR27      ]PJ                  ! R
]PJ                  ! R3R4R5.R6RBRB.R7^ ^.R<^/Ru34      Rv3.4      ]PJ                  ! Rw.4      ]PJ                  ! R
]PJ                  ! ]PJ                  ! ]PJ                  ! R3R4R5.R6RBRB.R7^ ^.R<^/4      Ru34      Rv34      3.4      ]PJ                  ! R4]PJ                  ! ]PJ                  ! ]PJ                  ! ]PJ                  ! R4]N3R5]PJ                  ! R3R4R5.R6RBRB.R7^ ^.R<^/4      3.4      Ru34      Rv34      Rr34      3.4      .4      RC 4       tORD tP]P|                  P                  ]R-R.7      RE 4       tQ]P|                  P                  RFRGR.4      RH 4       tRRI tSRJ tT. RxOtU. RyOtVRK tWRL tXRM tYRN tZRO t[RP t\RQ t]RR t^RS t_]P|                  P                  ]'       * RTR.7      ]P|                  P                  ]! RzRU7      ]P|                  P                  RVR.7      RW 4       4       4       4       taRX tbRY tcRZ td]P|                  P                  R=]PJ                  ! R3R4R5.R6]e]PJ                  ! R[R\R]/R^7      ./4      ]PJ                  ! ]NR\R]/R^7      ]PJ                  ! R_]NRc33.R\R]/R^7      ]PJ                  ! R3R4R5.R6]e]PJ                  ! R3R!.R6]PJ                  ! ]N/ R^7      ./4      ./4      .4      R` 4       tfR# ){aD  Test the .npy file format.

Set up:

    >>> import sys
    >>> from io import BytesIO
    >>> from numpy.lib import format
    >>>
    >>> scalars = [
    ...     np.uint8,
    ...     np.int8,
    ...     np.uint16,
    ...     np.int16,
    ...     np.uint32,
    ...     np.int32,
    ...     np.uint64,
    ...     np.int64,
    ...     np.float32,
    ...     np.float64,
    ...     np.complex64,
    ...     np.complex128,
    ...     object,
    ... ]
    >>>
    >>> basic_arrays = []
    >>>
    >>> for scalar in scalars:
    ...     for endian in '<>':
    ...         dtype = np.dtype(scalar).newbyteorder(endian)
    ...         basic = np.arange(15).astype(dtype)
    ...         basic_arrays.extend([
    ...             np.array([], dtype=dtype),
    ...             np.array(10, dtype=dtype),
    ...             basic,
    ...             basic.reshape((3,5)),
    ...             basic.reshape((3,5)).T,
    ...             basic.reshape((3,5))[::-1,::2],
    ...         ])
    ...
    >>>
    >>> Pdescr = [
    ...     ('x', 'i4', (2,)),
    ...     ('y', 'f8', (2, 2)),
    ...     ('z', 'u1')]
    >>>
    >>>
    >>> PbufferT = [
    ...     ([3,2], [[6.,4.],[6.,4.]], 8),
    ...     ([4,3], [[7.,5.],[7.,5.]], 9),
    ...     ]
    >>>
    >>>
    >>> Ndescr = [
    ...     ('x', 'i4', (2,)),
    ...     ('Info', [
    ...         ('value', 'c16'),
    ...         ('y2', 'f8'),
    ...         ('Info2', [
    ...             ('name', 'S2'),
    ...             ('value', 'c16', (2,)),
    ...             ('y3', 'f8', (2,)),
    ...             ('z3', 'u4', (2,))]),
    ...         ('name', 'S2'),
    ...         ('z2', 'b1')]),
    ...     ('color', 'S2'),
    ...     ('info', [
    ...         ('Name', 'U8'),
    ...         ('Value', 'c16')]),
    ...     ('y', 'f8', (2, 2)),
    ...     ('z', 'u1')]
    >>>
    >>>
    >>> NbufferT = [
    ...     ([3,2], (6j, 6., ('nn', [6j,4j], [6.,4.], [1,2]), 'NN', True), 'cc',
    ...         ('NN', 6j), [[6.,4.],[6.,4.]], 8),
    ...     ([4,3], (7j, 7., ('oo', [7j,5j], [7.,5.], [2,1]), 'OO', False), 'dd',
    ...         ('OO', 7j), [[7.,5.],[7.,5.]], 9),
    ...     ]
    >>>
    >>>
    >>> record_arrays = [
    ...     np.array(PbufferT, dtype=np.dtype(Pdescr).newbyteorder('<')),
    ...     np.array(NbufferT, dtype=np.dtype(Ndescr).newbyteorder('<')),
    ...     np.array(PbufferT, dtype=np.dtype(Pdescr).newbyteorder('>')),
    ...     np.array(NbufferT, dtype=np.dtype(Ndescr).newbyteorder('>')),
    ... ]

Test the magic string writing.

    >>> format.magic(1, 0)
    '\x93NUMPY\x01\x00'
    >>> format.magic(0, 0)
    '\x93NUMPY\x00\x00'
    >>> format.magic(255, 255)
    '\x93NUMPY\xff\xff'
    >>> format.magic(2, 5)
    '\x93NUMPY\x02\x05'

Test the magic string reading.

    >>> format.read_magic(BytesIO(format.magic(1, 0)))
    (1, 0)
    >>> format.read_magic(BytesIO(format.magic(0, 0)))
    (0, 0)
    >>> format.read_magic(BytesIO(format.magic(255, 255)))
    (255, 255)
    >>> format.read_magic(BytesIO(format.magic(2, 5)))
    (2, 5)

Test the header writing.

    >>> for arr in basic_arrays + record_arrays:
    ...     f = BytesIO()
    ...     # XXX: arr is not a dict, items gets called on it
    ...     format.write_array_header_1_0(f, arr)
    ...     print(repr(f.getvalue()))
    ...
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '|u1', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '|u1', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '|u1', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '|i1', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '|i1', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '|i1', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<u2', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<u2', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<u2', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<u2', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<u2', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<u2', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>u2', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>u2', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>u2', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>u2', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>u2', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>u2', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<i2', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<i2', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<i2', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<i2', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<i2', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<i2', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>i2', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>i2', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>i2', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>i2', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>i2', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>i2', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<u4', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<u4', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<u4', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<u4', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<u4', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<u4', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>u4', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>u4', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>u4', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>u4', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>u4', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>u4', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<i4', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<i4', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<i4', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<i4', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<i4', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<i4', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>i4', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>i4', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>i4', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>i4', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>i4', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>i4', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<u8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<u8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<u8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<u8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<u8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<u8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>u8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>u8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>u8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>u8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>u8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>u8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<i8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<i8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<i8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<i8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<i8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<i8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>i8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>i8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>i8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>i8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>i8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>i8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<f4', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<f4', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<f4', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<f4', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<f4', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<f4', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>f4', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>f4', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>f4', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>f4', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>f4', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>f4', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<f8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<f8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<f8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<f8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<f8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<f8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>f8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>f8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>f8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>f8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>f8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>f8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<c8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '<c8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '<c8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '<c8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '<c8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '<c8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '>c8', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': '>c8', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': '>c8', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': '>c8', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': '>c8', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': '>c8', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': '<c16', 'fortran_order': False, 'shape': (0,)}             \n"
    "F\x00{'descr': '<c16', 'fortran_order': False, 'shape': ()}               \n"
    "F\x00{'descr': '<c16', 'fortran_order': False, 'shape': (15,)}            \n"
    "F\x00{'descr': '<c16', 'fortran_order': False, 'shape': (3, 5)}           \n"
    "F\x00{'descr': '<c16', 'fortran_order': True, 'shape': (5, 3)}            \n"
    "F\x00{'descr': '<c16', 'fortran_order': False, 'shape': (3, 3)}           \n"
    "F\x00{'descr': '>c16', 'fortran_order': False, 'shape': (0,)}             \n"
    "F\x00{'descr': '>c16', 'fortran_order': False, 'shape': ()}               \n"
    "F\x00{'descr': '>c16', 'fortran_order': False, 'shape': (15,)}            \n"
    "F\x00{'descr': '>c16', 'fortran_order': False, 'shape': (3, 5)}           \n"
    "F\x00{'descr': '>c16', 'fortran_order': True, 'shape': (5, 3)}            \n"
    "F\x00{'descr': '>c16', 'fortran_order': False, 'shape': (3, 3)}           \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': 'O', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (0,)}              \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': ()}                \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (15,)}             \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (3, 5)}            \n"
    "F\x00{'descr': 'O', 'fortran_order': True, 'shape': (5, 3)}             \n"
    "F\x00{'descr': 'O', 'fortran_order': False, 'shape': (3, 3)}            \n"
    "v\x00{'descr': [('x', '<i4', (2,)), ('y', '<f8', (2, 2)), ('z', '|u1')],\n 'fortran_order': False,\n 'shape': (2,)}         \n"
    "\x16\x02{'descr': [('x', '<i4', (2,)),\n           ('Info',\n            [('value', '<c16'),\n             ('y2', '<f8'),\n             ('Info2',\n              [('name', '|S2'),\n               ('value', '<c16', (2,)),\n               ('y3', '<f8', (2,)),\n               ('z3', '<u4', (2,))]),\n             ('name', '|S2'),\n             ('z2', '|b1')]),\n           ('color', '|S2'),\n           ('info', [('Name', '<U8'), ('Value', '<c16')]),\n           ('y', '<f8', (2, 2)),\n           ('z', '|u1')],\n 'fortran_order': False,\n 'shape': (2,)}      \n"
    "v\x00{'descr': [('x', '>i4', (2,)), ('y', '>f8', (2, 2)), ('z', '|u1')],\n 'fortran_order': False,\n 'shape': (2,)}         \n"
    "\x16\x02{'descr': [('x', '>i4', (2,)),\n           ('Info',\n            [('value', '>c16'),\n             ('y2', '>f8'),\n             ('Info2',\n              [('name', '|S2'),\n               ('value', '>c16', (2,)),\n               ('y3', '>f8', (2,)),\n               ('z3', '>u4', (2,))]),\n             ('name', '|S2'),\n             ('z2', '|b1')]),\n           ('color', '|S2'),\n           ('info', [('Name', '>U8'), ('Value', '>c16')]),\n           ('y', '>f8', (2, 2)),\n           ('z', '|u1')],\n 'fortran_order': False,\n 'shape': (2,)}      \n"
N)BytesIO)format)IS_64BITIS_WASMassert_assert_array_equalassert_raisesassert_raises_regex)requires_memoryz<>i  dtype:NN   xi4g      @g      @g      @g      @InfoInfo2info              @nny              @NNTcc              @ooy              @OOFdd<>cc                   6   a a ] tR tRt oRV 3R lltRtVtV ;t# )BytesIOSRandomSizei  c                N   < ^ RI pVP                  ^V4      p\        SV `  V4      # )    N)randomrandintsuperread)selfsizer"   	__class__s   && @/usr/lib/python3.14/site-packages/numpy/lib/tests/test_format.pyr%   BytesIOSRandomSize.read  s%    ~~a&w|D!!     N)__name__
__module____qualname____firstlineno__r%   __static_attributes____classdictcell____classcell__)r(   __classdict__s   @@r)   r   r     s     " "r+   r   c                     \        4       p\        P                  ! W4       \        VP                  4       4      p\        P                  ! VR R7      pV# )Tallow_pickler   r   write_arraygetvalue
read_arrayarrff2arr2s   &   r)   	roundtriprB     s>    	A
q		BRd3DKr+   c                     \        4       p\        P                  ! W4       \        VP	                  4       4      p\        P
                  ! V4      pV# r-   )r   r   r:   r   r;   r<   r=   s   &   r)   roundtrip_randsizerD     s<    	A
q	AJJL	)BR DKr+   c                     \        4       p\        P                  ! W4       \        VP                  4       ^ R 4      p\        P                  ! V4      pV# )r!   r9   r=   s   &   r)   roundtrip_truncatedrG     sC    	A
q	a#	$BR DKr+   c                      \        W8H  4       R # r-   )r   )o1o2s   &&r)   assert_equal_rK     s    BHr+   c                  b    \         \        ,            F  p \        V 4      p\        W4       K  	  R # r-   )basic_arraysrecord_arraysrB   r   r>   rA   s     r)   test_roundtriprP     s%    m++~3% ,r+   c                      \         \        ,            F0  p V P                  \        8w  g   K  \	        V 4      p\        W4       K2  	  R # r-   )rM   rN   r   objectrD   r   rO   s     r)   test_roundtrip_randsizerS     s2    m++99%c*Ds) ,r+   c                  x    \          F/  p V P                  \        8w  g   K  \        \        \
        V 4       K1  	  R # r-   )rM   r   rR   r   
ValueErrorrG   r>   s    r)   test_roundtrip_truncatedrW     s%    99*&93? r+   c           
         V R ,          p\          EF  pVP                  \        8w  g   K  \        VR4      ;_uu_ 4       p\        P
                  ! W24       RRR4       \        VR4      ;_uu_ 4       pVP                  R\        P                  4       VP                  4        RRR4       \        VR4      ;_uu_ 4       p\        P                  ! \        VP                  ^ 8X  d   RMRR7      ;_uu_ 4        \        P                  ! V4      pRRR4       RRR4       EK  	  R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LE; i  + '       g   i     EK`  ; i)	za.npywbNzrb+rbz9EOF: reading array header, expected (\d+) bytes got (\d+)zFailed to read all data for array\. Expected \(.*?\) = (\d+) elements, could only read (\d+) elements\. \(file seems not fully written\?\)matchrF   )rM   r   rR   openr   r:   seekosSEEK_ENDtruncatepytestraisesrU   r'   r<   )tmp_pathpathr>   r?   _s   &    r)   test_file_truncatedrg     s    gD|99dD!!Q""1* " dE""ar2;;'

 # dD!!Q]] Q:>  ))!,A "! !! #"  "!!s;   D%21D8?8E7EE%D58EEEE0c                      \         P                  ! ^\         P                  ! \        \        P
                  ^,           34      R7      p \        V 4      p\        W4       R# )   r   N)nponesr   strr   BUFFER_SIZErB   r   )long_str_arrlong_str_arr2s     r)   test_long_strrp     s=    771BHHc63E3E3I-J$KLLl+M|3r+   zmemmap doesn't work correctly)reasonc           	      
   \        \        \        ,           4       EF  w  rVP                  P                  '       d   K$  \
        P                  P                  V R V R24      p\
        P                  P                  V RV R24      p\        VR4      ;_uu_ 4       p\        P                  ! WR4       RRR4       VP                  P                  ;'       d    VP                  P                  '       * p\        P                  ! VRVP                  VP                  VR7      pW'R&   VP!                  4        \        VR4      ;_uu_ 4       pVP#                  4       pRRR4       \        VR4      ;_uu_ 4       pVP#                  4       p	RRR4       \%        XX	4       \        P                  ! VR	R
7      pVP!                  4        EK  	  R#   + '       g   i     EL"; i  + '       g   i     L; i  + '       g   i     Lr; i)normalz.npymemmaprY   Nw+)moder   shapefortran_order.rZ   r)rv   )	enumeraterM   rN   r   	hasobjectr_   re   joinr]   r   r:   flagsf_contiguousc_contiguousopen_memmaprw   flushr%   rK   )
tmpdirir>   nfnmfnfprx   manormal_bytesmemmap_bytess
   &         r)   test_memmap_roundtripr     s_    L=8999ggll6VA3d#34ggll6VA3d#34#t__r'  II""AA399+A+A'A 	$cii&)ii}N3

 #t__779L #t__779L lL1 #.

5 : __ __s$   G
G7G2GG/2Hc                 R   \         P                  P                  ^^4      p\        P                  P                  V R4      p\         P                  ! W!R7       \         P                  ! V4      ;_uu_ 4       pVR,          pRRR4       \        VX4       R#   + '       g   i     L; i)   zcompressed.npzrV   r>   N)	rj   r"   randr_   re   r|   savez_compressedloadr   )r   r>   npz_filenpzarr1s   &    r)   test_compressed_roundtripr   	  sk    
))..c
"Cww||F$45H*			c5z 
sD! 
	s   6
BB&	z
i1, i4, i1)alignnamesabformatsoffsetsdtitlesaabbitemsizedtc                 z   \         P                  ! ^V4      p\        ^4       F  pV^,           W#&   K  	  \        P                  P                  V R4      p\         P                  ! WBR7       \         P                  ! V4      ;_uu_ 4       pVR,          pRRR4       \        VX4       R#   + '       g   i     L; i)   zaligned.npzrV   r>   N)	rj   zerosranger_   re   r|   savezr   r   )r   r   r>   r   r   r   r   s   &&     r)   test_load_padded_dtyper   !  s|    
((1b/C1XQ ww||FM2HHHX			c5z 
sD! 
	s   

B**B:	zJignore:.*align should be passed:numpy.exceptions.VisibleDeprecationWarningc            
         \         P                  P                  \         P                  P                  \        4      R 4      p \
        P                  ! R\        RR.\        R7      pR EF  p\         P                  P                  W4      pR F  p\
        P                  ! VRVR7      pVP                  R4      '       d   VR	,          pVP                  4        MTpVR8X  du   VP                  R
4      '       d^   \        \        V^,          \        4      4       \!        VRR VRR 4       \!        VR,          P#                  V4      VR,          4       K  \        \        V^,          \$        4      4       \!        Wa4       K  	  VP                  R
4      '       g   EK8  VP                  R4      '       d   \
        P                  ! VRR7      p\'        \(        VP*                  R	4       VP                  4        \
        P                  ! VRRRR7      p\'        \,        VP*                  R	4       VP                  4        EK  \'        \(        \
        P                  VRR7       \'        \,        \
        P                  VRRRR7       EK!  	  R# )dataNu   優良s   不良r   latin1Tr8   encodingz.npzr   py2r7   F)r8   fix_importsr   )zpy2-np0-objarr.npypy2-objarr.npypy2-objarr.npzzpy3-objarr.npyzpy3-objarr.npz)bytesr   rF   )r_   re   r|   dirname__file__rj   arrayr   rR   r   endswithclose
startswithr   
isinstancerl   r   encoder   r   UnicodeError__getitem__ImportError)data_direxpectedfnamere   r   data_fr   s          r)   test_pickle_python2_python3r   -  s   
 ww||BGGOOH5v>Hxxun46$&H6ww||H,+HWWTxHF~~f%%c{8#(8(8(?(?
47C01"49hsm<"48??8#<hrlK
47E23"42 ," E""~~f%%wwt$7lD,<,<cB

wwt$E(02k4+;+;SA

lBGGT+/1k277D+/U'/1 1C6r+   c           
         \         P                  P                  \         P                  P                  \        4      R 4      p\         P                  P                  VR4      p\        \        \        P                  VRRR7       \         P                  P                  VR4      p\        P                  ! VRRR7      ;_uu_ 4       p\        \        VP                  R4       RRR4       \         P                  P                  V R4      p\        \        \        P                  V\        P                  ! R.\        R	7      RR
7       R#   + '       g   i     Lo; i)r   r   Fr   r   r   r   Nzpickle-disabled.npyr   r7   )r_   re   r|   r   r   r   rU   rj   r   r   saver   rR   )r   r   re   r?   s   &   r)   test_pickle_disallowr   ^  s    ww||BGGOOH5v>H77<<"23D*bggt$x9 77<<"23D	EH	=	=j!--5 
> 77<< 56D*bggtRXXtfF-K$&	 
>	=s   EE	i1c                     \         P                  ! V P                  4      p\        W4       \        P
                  ! ^V 4      p\        V4      p\        W#4       R# )r   N)r   descr_to_dtypedescrrK   rj   r   rB   r   )r   dt1r   rA   s   &   r)   test_descr_to_dtyper   m  sA    d 


)C#88Ar?DT?Dt"r+   c                  2   \        4       p \        R 4       Uu. uF  q ^d,          \        3NK  	  pp\        P                  ! RVR7      p\
        P                  ! WRR7       \        P                  ! RR7      ;_uu_ 4       p\        P                  ! RR\        4       \
        P                  ! W4       \        V^ ,          P                  \        J 4       RRR4       V P                  ^ 4       V P                  4       p\        \        V4      \
        P                   ,          ^ 8H  4       V P                  ^ 4       \
        P"                  ! V R	R
7      p\%        W64       \'        \(        \
        P                  WR4       R# u upi   + '       g   i     L; i)    r   versionTrecordalways N@ max_header_sizer   r!   ri   r!   )r   r   floatrj   rk   r   r:   warningscatch_warningsfilterwarningsUserWarningr   categoryr^   readlinelenARRAY_ALIGNr<   r   r   rU   )r?   r   r   r   wheaderns          r)   test_version_2_0r     s   	A).s	4ASC<
B	4
BA
qV,		 	 	-	-"k:1 !,- 
. FF1IZZ\FCK&,,,12FF1I!V4Aq *f00!?' 
5 
.	-s   FAFF	c           
         \        R 4       Uu. uF  q ^d,          \        3NK  	  pp\        P                  ! RVR7      p\        P
                  P                  V R4      p\        P
                  P                  V R4      p\        \        \        P                  VRVP                  VP                  RR7       \        P                  ! VRVP                  VP                  RR7      pW6R&   VP                  4        \        P                  ! VRR	R
7      p\        Wc4       \        P                   ! RR7      ;_uu_ 4       p\        P"                  ! RR\$        4       \        P                  ! VRVP                  VP                  RR7      p\'        V^ ,          P(                  \$        J 4       W6R&   VP                  4        RRR4       \        P                  ! VRR	R
7      p\        Wc4       R# u upi   + '       g   i     L;; i)r   r   r   zversion2_01.npyzversion2_02.npyru   )rv   r   rw   r   .ry   r   )rv   r   Tr   r   r   Nr   r   )r   r   rj   rk   r_   re   r|   r   rU   r   r   r   rw   r   r   r   r   r   r   r   r   )r   r   r   r   tf1tf2r   r   s   &       r)   test_version_2_0_memmapr     su    */s	4ASC<
B	4
BA
'',,v0
1C
'',,v0
1C *f00#D"#''6; 
		Cd!''"#''6
;BsGHHJ			Cc6	BBr		 	 	-	-"k:$agg&'ggt=!,-3

 
. 
		Cc6	BBr5 
5  
.	-s   G.>BG33H		mmap_modery   c                 (   \         P                  P                  V R 4      p\        P                  ! ^RR,          R,           R7      p\
        P                  ! \        RR7      ;_uu_ 4        \        P                  ! W#4       RRR4       \
        P                  ! \        RR7      ;_uu_ 4        \        P                  ! W!R	7       RRR4       \
        P                  ! \        RR7      ;_uu_ 4        \        P                  ! W!R
R7       RRR4       \        P                  ! W!RR7      p\        WC4       \        P                  ! W!RR7      p\        WC4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L~; i)zlarge_header.npyi,'  r   r   .*format 2.0r[   NHeader.*large)r    N  )r   r   T)r   r8     )r_   re   r|   rj   r   rb   warnsr   r   rc   rU   r   r   )r   r   r?   r>   ress   &&   r)   test_huge_headerr     s    
V/0A
((1D5L3.
/C	k	8	8
 
9 
z	9	9
' 
: 
z	9	9
> 
: ''!t
<Cs 
''!&
ACs  
9	8 
:	9 
:	9s$   +E.E.2FE+	.E>	F	c                 `   \         P                  P                  V R 4      p\        P                  ! ^RR,          R,           R7      p\
        P                  ! \        RR7      ;_uu_ 4        \        P                  ! WR7       RRR4       \
        P                  ! \        R	R7      ;_uu_ 4        \        P                  ! V4      R
,           RRR4       \
        P                  ! \        R	R7      ;_uu_ 4        \        P                  ! VRR7      R
,           RRR4       \        P                  ! VRR7      R
,          p\        W24       \        P                  ! VRR7      R
,          p\        W24       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)zlarge_header.npzr   r   r   r   r   r[   rV   Nr   r>   r   r   Tr7   r   )r_   re   r|   rj   r   rb   r   r   r   rc   rU   r   r   )r   r?   r>   r   s   &   r)   test_huge_header_npzr     s    
V/0A
((1D5L3.
/C	k	8	8
 
9 
z	9	9

5 
: 
z	9	9
5)%0 
: ''!$
'
.Cs 
''!V
,U
3Cs  
9	8 
:	9 
:	9s$   +E7/F
9 F7F	
F	F-	c            	         \        4       p \        P                  ! ^4      p\        P                  ! WRR7       \        P                  ! W4       \        P                  ! WRR7       \        P                  ! W4       \        P                  ! WRR7       \        P                  ! W4       . ROpV F<  p\        \        R4      ;_uu_ 4        \        P                  ! WVR7       RRR4       K>  	  R#   + '       g   i     KS  ; i)ri   r   Nz we only support format version.*r   r   ))ri   ri   )r!   r!   )r!   ri   r   r   )   r   )r   rj   aranger   r:   r	   rU   )r?   r>   bad_versionsr   s       r)   test_write_versionr     s    	A
))A,C
qv.
q
qt,
q
qv.
qL   !CE Eqw7E E  E E Es   C33Dc                  B   \        4       p \        4       p\        P                  ! R\        R7      p\        P
                  ! WRR7       \        P
                  ! WRR7       V P                  ^ 4       VP                  ^ 4       \        P                  ! V 4      p\        P                  ! V4      p\        VR8H  4       \        VR8H  4       \        V P                  4       \        P                  8H  4       \        VP                  4       \        P                  8H  4       R# )r   r   r   Nr      r   r   )r   rj   rk   r   r   r:   r^   
read_magicr   tell	MAGIC_LEN)s1s2r>   version1version2s        r)   test_read_magicr  2  s    	B	B
''&
&C
r/
r/GGAJGGAJ  $H  $HHHBGGI)))*BGGI)))*r+   c                  t    \          F-  p \        V 4      p\        \        \        P
                  V4       K/  	  R # r-   )malformed_magicr   r   rU   r   r<   magicr?   s     r)   test_read_magic_bad_magicr
  G  s'     ENj&"3"3Q7 !r+   c                      \         \        ,            F-  p \        V 4      p\        \        \
        P                  V4       K/  	  R # r-   )bad_version_magicr  r   r   rU   r   r<   r  s     r)   test_read_version_1_0_bad_magicr  M  s/    "_44ENj&"3"3Q7 5r+   c                     \        \        \        P                  R^4       \        \        \        P                  R^4       \        \        \        P                  ^R4       \        \        \        P                  ^R4       R# )ri      NrF   )r   rU   r   r	  r,   r+   r)   test_bad_magic_argsr  S  sJ    *fllB2*fllC3*fllAr2*fllAs3r+   c                      \        4       p R RRRRR/p\        P                  ! W4       \        4       p RR,          R3.VR&   \        \        \        P                  W4       R# )	rw   rx   Fr   z<i8r  Nr,      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r   r   write_array_header_1_0r   rU   sr   s     r)   test_large_headerr  Z  sW    	A	"ougu=A
!!!'	As?E*+AgJ*f;;QBr+   c                     \        4       p \        P                  ! R\        R7      p\        P
                  ! WRR7       V P                  \        P                  4       \        P                  ! V 4      w  r#p\        V P                  4       \        P                  ,          ^ 8H  4       \        W#V3RR\        38H  4       R# )r   r   r   FNr   r   )r   rj   rk   r   r   r:   r^   r   read_array_header_1_0r   r   r   r  r>   rw   fortranr   s        r)   test_read_array_header_1_0r  d      	A
''&
&C
qv.FF6"88;EEAFFHv)))Q./UU#u'==>r+   c                     \        4       p \        P                  ! R\        R7      p\        P
                  ! WRR7       V P                  \        P                  4       \        P                  ! V 4      w  r#p\        V P                  4       \        P                  ,          ^ 8H  4       \        W#V3RR\        38H  4       R# )r   r   r   FNr   r   )r   rj   rk   r   r   r:   r^   r   read_array_header_2_0r   r   r   r  s        r)   test_read_array_header_2_0r  q  r  r+   c                     \        4       p \        \        \        P                  V 4       \        R 4      p \        \        \        P                  V 4       \        R4      p \        \        \        P                  V 4       \        R4      p \        \        \        P                  V 4       RR
RRRRRR/p\        4       p \        P
                  ! W4       \        \        \        P                  V 4       R	# )   1s    s@   NUMPY 6 {'descr': 'x', 'shape': (1, 2), }                    
rw   rx   Fr   r   extrakeyNri   r   rF   )r   r   rU   r   r  r  r  s     r)   test_bad_headerr$  ~  s    	A*f::A>A*f::A> 	A*f::A>
 		"	A *f::A>	&	%	#	R	A 		A
!!!'*f::A>r+   c                    \         P                  R 8X  g   \         P                  R8X  d   \        P                  ! R4       \        P
                  P                  V R4      p ^ RIpVP                  RRRV.4       \        VR	4      ;_uu_ 4       pVP                  R
4       \        P                  ! ^4      p\        P                  ! W44       RRR4       \        VR4      ;_uu_ 4       pVP                  R
4       \        P                  ! V4      pRRR4       \!        XX4       R#   \         d    \        P                  ! R4        Li ; i  + '       g   i     L; i  + '       g   i     LX; i)win32cygwinz)Unknown if Windows has sparse filesystemssparse_fileNra   z-s
5368709120zCould not create 5GB large filerY   l        rZ   )sysplatformrb   skipr_   re   r|   
subprocess
check_call	Exceptionr]   r^   rj   r   r   r   r   )r   tf_namespr?   r   ry   s   &     r)   test_large_file_supportr2    s    3<<8#;?@ggll6=1G7 	 
z4w?@ 
gt			zIIaL
 

 
gt			zGGAJ 
 q!  7567 
	
 
	s*   "D' >E)(E!'!E
EE	!E1	ztest requires 64-bit system)
free_byteszcrashes with low memoryc                    R	p \         P                  ! V\         P                  R7      p\        P                  P                  V R4      p\        VR4      ;_uu_ 4       p\         P                  ! VXR7       RRR4       ?\        VR4      ;_uu_ 4       p\         P                  ! V4      R,          pRRR4       R#   \         d    \        P
                  ! R4        Li ; i  + '       g   i     Lt; i  + '       g   i     R# ; i)
r   r   zCould not create large filelarge_archiverY   rV   NrZ   r>   )i   @r   )rj   emptyuint8MemoryErrorrb   r,  r_   re   r|   r]   r   r   )r   rw   r   r   r?   new_as   &     r)   test_large_archiver:    s     E3HHU"((+ GGLL1E	eT		a
 
 	
	eT		a
5! 
	  3123
 
	
 
		s)   &B< C#C6<!C C #C3	6D	c                     \         P                  P                  V R 4      p\        P                  ! V4       \        P
                  ! V4      ;_uu_ 4       p RRR4       R#   + '       g   i     R# ; i)znothing.npzN)r_   re   r|   rj   r   r   )r   r   npss   &  r)   test_empty_npzr=    s?    GGLL/EHHUO	3 
s   A!!A2	c           
         \         P                  ! . R	OR\        3R\        3.R7      p\        P                  P                  V R4      p\        VR4      ;_uu_ 4       p\        P                  ! W1R
R7       RRR4       \        VR4      ;_uu_ 4       p\        P                  ! V4      pRRR4       \        VX4       \        VR4      ;_uu_ 4       p\        P                  ! \        4      ;_uu_ 4        \        P                  ! W1RR7       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L@; i  + '       g   i     R# ; i)ri   intu   整形r   zunicode.npyrY   r   NrZ   )ri   r   r#  r@  r#  )r   r!   )rj   r   r?  r_   re   r|   r]   r   r:   r<   r   rb   r   r   )r   r>   r   r?   rA   s   &    r)   test_unicode_field_namesrA    s    
((  
	GMC GGLL/E	eT		a162 
	eT		a  # 
sD! 
eT		a\\+&&qt4 ' 
	 
			 '& 
		s<   DD2#E4E	ED/	2E	EEE)	c                  \   . RO. RO. RO. R	O3 F  w  rp\        \        P                  4       Uu. uF  p^
V,          NK  	  up FZ  p\        4       p\        P                  ! TRV '       d   ^V3MV^3RV R\
        P                  ! RV,          \        3.4      /4       K\  	  K  	  R# u upi )
Frw   rx   r    N)F      )F      )TrF  rE  )T   rG  )r   r   GROWTH_AXIS_MAX_DIGITSr   r  rj   r   r?  )is_fortran_arraydtype_spaceexpected_header_lengthr   r'   r   s         r)   test_header_growth_axisrM    s    *O_B='= %*&*G*G$HI$HqRUU$HIDB))"&6!TT1I!1C+$5s#;"<=/  JB Js   B)S3somestuff)metadatasubarrayc                 b   \         P                  ! ^
V R7      p\        4       p\        P                  ! \
        4      ;_uu_ 4        \         P                  ! W!4       RRR4       TP                  ^ 4       \         P                  ! V4      p^ RI	H
p \        W4       R#   + '       g   i     LJ; i)
   r   N)drop_metadata)rj   rk   r   rb   r   r   r   r^   r   numpy.lib._utils_implrU  r   )r   r>   bufrA   rU  s   &    r)   test_metadata_dtyperX    si     ''"B
C
)C	k	"	"
 
#HHQK 773<D3s! 
#	"s   BB.	)   2   rF   r   r   r   r[  yf8r   zu1)r\  r]  r`  )valuec16)y2r_  nameS2)rf  )rc  rd  r[  )y3r_  r[  )z3u4r[  )z2b1)colorrh  )NameU8)Valuerd  )r   r   )r   r      )r   z<f8rr  r[  )r   r   r   )r   )   )r   rt  r[  )s   NUMPYs   NUMPY  s   NUMPY s   NUMPY s   NUMPYs   NUMPY)s   NUMPY s    NUMPY s   numpy s   MATLB s   NUMPYs   NUMPYr+   l        )g__doc__r_   r*  r   ior   rb   numpyrj   	numpy.libr   numpy.testingr   r   r   r   r   r	   numpy.testing._private.utilsr
   r7  int8uint16int16uint32int32uint64int64float32float64	complex64
complex128rR   scalarsrM   scalarendianr   newbyteorderr   astypebasicextendr   reshapeTPdescrPbufferTNdescrNbufferTr   rN   r   rB   rD   rG   rK   rP   rS   rW   rg   rp   markskipifslowr   r   r   dt2dt3dt4dt5dt6parametrizer   r   r   r   r?  r   r   r   r   r   r   r  r  r  r
  r  r  r  r  r  r$  r2  thread_unsafer:  r=  rA  rM  r   rX  r,   r+   r)   <module>r     s  Ul 
 
       9 HHGGIIHHIIHHIIHHJJJJLLMM
 F --f5		$&&u-HHRu%HHRu%MM(#MM(#%%MM(#DbD#I.
 	  6
 Vr2hR!1%Vr2hR!1%( 	   	!
 		 	   #
( Vb"tb"XBx!Q8$E	:R2r(+Q0Vb"tb"XBx!Q8$F	:R2r(+Q0 HHXRXXf-::3?@HHXRXXf-::3?@HHXRXXf-::3?@HHXRXXf-::3?@HHQ123" "&*@
-24 G$CD  E<" 	hh|4(hh#sYtAq6# $ 	hh#sYs<=hhTFQJ?@hh#sYtAq68dD\; < 	hhYJ:;S#sC=>" ?" PR,1R,1^&  HHsBGGnBHHoBHHo  HHsBHHwc
'$'!Q(!
      HH    HHsBHH
HHgSz$!Q !% &  	 		
 	 	 

 
 HH	bhhHHHHc
bhh#s(1D$<(1Aq6(2A(7 8 9  	 	   
  	
 =0  0b#c0b#@2 G$CD E< sDk2! 3!&!(86 +*884C
?
??:2 L)FGI&";<  = '  H ,5.@ HHgSz9rxx!7+8- 0. / 0HHSFG,-HHzC;'(FG3DEHHgSz9rxx3%RXXcB5O4PQR/  	  	3	3r+   