+
    &i                        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Ht ^ RIHt ]P*                  ]P,                  ]P.                  ]P0                  ]P2                  ]P4                  ]P6                  ]P8                  ]P:                  ]P<                  ]P>                  ]P@                  ]!.t". t#]" F  t$R F  t%]PL                  ! ]$4      PO                  ]%4      t&]PP                  ! R4      PS                  ]&4      t*]#PW                  ]PX                  ! . ]&R7      ]PX                  ! ^
]&R7      ]*]*P[                  Rf4      ]*P[                  Rf4      P\                  ]*P[                  Rf4      RRRg1R	3,          .4       K  	  K  	  . RlOt/^^.RR.RR..^3^^.RR.RR..^	3.t0RiRRmRnR. RpO3RoRq.3RrRRsRt.3RjRk.t1^^.RRRRR.RR.^^.3RR3RRuRR.RR..^3^^.RRRRR.RR.^^.3RR3RRvRR.RR..^	3.t2]PX                  ! ]0]PL                  ! ]/4      PO                  R4      R7      ]PX                  ! ]2]PL                  ! ]14      PO                  R4      R7      ]PX                  ! ]0]PL                  ! ]/4      PO                  R 4      R7      ]PX                  ! ]2]PL                  ! ]14      PO                  R 4      R7      ]Pf                  ! ^Rx.R7      .t4 ! R" R#]4      t5R$ t6R% t7R& t8R' t9R( t:R) t;R* t<R+ t=R, t>]P~                  P                  ]R-R.7      ]P~                  P                  R/ 4       4       tBR0 tC]PL                  ! R1RR27      tD]PL                  ! R3R4R5.R6RR.R7^^./4      tE]PL                  ! R3R!R8.R6R]E./4      tF]PL                  ! R3. RyOR6R.^,          /4      tG]PL                  ! R3R4R5.R6RR.R7^^.R9R:R;./4      tH]PL                  ! R3. R6. R<^/4      tI]P~                  P                  R=]D]E]F]G]H]I.4      R> 4       tK]P~                  P                  ]P                  Rz8  R?R.7      ]P~                  P                  ]R@R.7      RA 4       4       tN]P~                  P                  RB4      RC 4       tPRD tQ]P~                  P                  R=]PL                  ! R4]P,                  3R5]P0                  3R!]P4                  3.RR27      ]PL                  ! R
]PL                  ! R3R4R5.R6RERE.R7^ ^.R<^/R{34      R|3.4      ]PL                  ! R}.4      ]PL                  ! R
]PL                  ! ]PL                  ! ]PL                  ! R3R4R5.R6RERE.R7^ ^.R<^/4      R{34      R|34      3.4      ]PL                  ! R4]PL                  ! ]PL                  ! ]PL                  ! ]PL                  ! R4]R3R5]PL                  ! R3R4R5.R6RERE.R7^ ^.R<^/4      3.4      R{34      R|34      Rw34      3.4      .4      RF 4       tSRG tT]P~                  P                  ]R-R.7      RH 4       tU]P~                  P                  RIRJR.4      RK 4       tVRL tWRM tX. R~OtY. ROtZRN t[RO t\RP t]RQ t^RR t_RS t`RT taRU tbRV tc]P~                  P                  ]RWR.7      ]P~                  P                  ]'       * RXR.7      ]P~                  P                  ]! RRY7      ]P~                  P                  RZR.7      R[ 4       4       4       4       4       teR\ tfR] tgR^ th]P~                  P                  R=]PL                  ! R3R4R5.R6]i]PL                  ! R_R`Ra/Rb7      ./4      ]PL                  ! ]RR`Ra/Rb7      ]PL                  ! Rc]RRh33.R`Ra/Rb7      ]PL                  ! R3R4R5.R6]i]PL                  ! R3R!.R6]PL                  ! ]R/ Rb7      ./4      ./4      .4      ]P~                  P                  ];'       d    ]P                  P                  R8*  RdR.7      Re 4       4       tlR# )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()
    ...     format.write_array_header_1_0(f, arr)   # XXX: arr is not a dict, items gets called on it
    ...     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_PYPY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   && Y/var/www/html/photoedit/myenv/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*   	roundtriprC     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_randsizerE     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"   r:   r>   s   &   r*   roundtrip_truncatedrH     sC    	A
q	a#	$BR DKr,   c                      \        W8H  4       R # r.   )r   )o1o2s   &&r*   assert_equal_rL     s    BHr,   c                  b    \         \        ,            F  p \        V 4      p\        W4       K  	  R # r.   )basic_arraysrecord_arraysrC   r   r?   rB   s     r*   test_roundtriprQ     s%    m++~3% ,r,   c                      \         \        ,            F0  p V P                  \        8w  g   K  \	        V 4      p\        W4       K2  	  R # r.   )rN   rO   r   objectrE   r   rP   s     r*   test_roundtrip_randsizerT     s2    m++99%c*Ds) ,r,   c                  x    \          F/  p V P                  \        8w  g   K  \        \        \
        V 4       K1  	  R # r.   )rN   r   rS   r	   
ValueErrorrH   r?   s    r*   test_roundtrip_truncatedrX     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\?\)matchrG   )rN   r   rS   openr   r;   seekosSEEK_ENDtruncatepytestraisesrV   r(   r=   )tmp_pathpathr?   r@   _s   &    r*   test_file_truncatedrh     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_SIZErC   r   )long_str_arrlong_str_arr2s     r*   test_long_strrq     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memmaprZ   Nw+)moder   shapefortran_order.r[   r)rw   )	enumeraterN   rO   r   	hasobjectr`   rf   joinr^   r   r;   flagsf_contiguousc_contiguousopen_memmaprx   flushr&   rL   )
tmpdirir?   nfnmfnfpry   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.npzrW   r?   N)	rk   r#   randr`   rf   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.npzrW   r?   N)	rk   zerosranger`   rf   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:	zsee gh-23988z!Emscripten NODEFS has a buggy dupc                  z   R p \         P                  P                  \         P                  P                  \        4      RV 4      p\
        P                  ! \        RR7      ;_uu_ 4        \        P                  ! V4      pRRR4       \        X\        P                  ! ^4      4       R#   + '       g   i     L2; i)zwin64python2.npydatazReading.*this warning\.r\   N)r`   rf   r}   dirname__file__rc   warnsUserWarningrk   r   r   rl   )fnamerf   r   s      r*   %test_python2_python3_interoperabilityr   +  sm     E77<<165AD	k)C	D	Dwwt} 
EtRWWQZ( 
E	Ds   )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# )r   Nu   優良s   不良r   latin1Tr9   encodingz.npzr   py2r8   F)r9   fix_importsr   )zpy2-np0-objarr.npypy2-objarr.npypy2-objarr.npzzpy3-objarr.npyzpy3-objarr.npz)bytesr   rG   )r`   rf   r}   r   r   rk   arrayr   rS   r   endswithclose
startswithr   
isinstancerm   r   encoder   r	   UnicodeError__getitem__ImportError)data_direxpectedr   rf   r   data_fr   s          r*   test_pickle_python2_python3r   5  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   r8   )r`   rf   r}   r   r   r	   rV   rk   r   r   saver   rS   )r   r   rf   r@   s   &   r*   test_pickle_disallowr   f  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descrrL   rk   r   rC   r   )r   dt1r   rB   s   &   r*   test_descr_to_dtyper   u  sA    d 


)C#88Ar?DT?Dt"r,   c                  @   \        4       p \        R 4       Uu. uF  pRV,          ^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)  %d  r   versionTrecordalways N@ max_header_sizer   r"   rj   r"   )r   r   floatrk   rl   r   r;   warningscatch_warningsfilterwarningsr   r   categoryr_   readlinelenARRAY_ALIGNr=   r   r	   rV   )r@   r   r   r   wheaderns          r*   test_version_2_0r     s   	A-23Z	8ZD1HU
#ZB	8
BA
qV,		 	 	-	-"k:1 !,- 
. FF1IZZ\FCK&,,,12FF1I!V4Aq *f00!?' 
9 
.	-s   FAFF	c           
         \        R 4       Uu. uF  pRV,          ^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   r   zversion2_01.npyzversion2_02.npyrv   )rw   r   rx   r   .rz   r   )rw   r   Tr   r   r   Nr   r   )r   r   rk   rl   r`   rf   r}   r	   rV   r   r   r   rx   r   r   r   r   r   r   r   r   )r   r   r   r   tf1tf2r   r   s   &       r*   test_version_2_0_memmapr     sz    .33Z	8ZD1HU
#ZB	8
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 
9  
.	-s   G5BG::H
		mmap_moderz   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   r9     )r`   rf   r}   rk   r   rc   r   r   r   rd   rV   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\   rW   Nr   r?   r   r   Tr8   r   )r`   rf   r}   rk   r   rc   r   r   r   rd   rV   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)rj   r   Nz we only support format version.*r   r   ))rj   rj   )r"   r"   )r"   rj   r   r   )   r   )r   rk   aranger   r;   r
   rV   )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   rk   rl   r   r   r;   r_   
read_magicr   tell	MAGIC_LEN)s1s2r?   version1version2s        r*   test_read_magicr	  :  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	   rV   r   r=   magicr@   s     r*   test_read_magic_bad_magicr  O  s'     ENj&"3"3Q7 !r,   c                      \         \        ,            F-  p \        V 4      p\        \        \
        P                  V4       K/  	  R # r.   )bad_version_magicr  r   r	   rV   r   r=   r  s     r*   test_read_version_1_0_bad_magicr  U  s/    "_44ENj&"3"3Q7 5r,   c                     \        \        \        P                  R^4       \        \        \        P                  R^4       \        \        \        P                  ^R4       \        \        \        P                  ^R4       R# )rj      NrG   )r	   rV   r   r  r-   r,   r*   test_bad_magic_argsr  [  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# )	rx   ry   Fr   z<i8r  Nr-      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r   r   write_array_header_1_0r	   rV   sr   s     r*   test_large_headerr  b  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   rk   rl   r   r   r;   r_   r  read_array_header_1_0r   r  r   r  r?   rx   fortranr   s        r*   test_read_array_header_1_0r  l      	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   rk   rl   r   r   r;   r_   r  read_array_header_2_0r   r  r   r  s        r*   test_read_array_header_2_0r#  y  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), }                    
rx   ry   Fr   r   extrakeyNrj   r   rG   )r   r	   rV   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_fileNrb   z-s
5368709120zCould not create 5GB large filerZ   l        r[   )sysplatformrc   skipr`   rf   r}   
subprocess
check_call	Exceptionr^   r_   rk   r   r   r   r   )r   tf_namespr@   r   rz   s   &     r*   test_large_file_supportr6    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flaky on PyPyztest requires 64-bit system)
free_byteszcrashes with low memoryc                 8   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       XP                  V8X  g   Q hR#   \         d    \        P
                  ! R4        Li ; i  + '       g   i     L; i  + '       g   i     L_; i)
r   r   zCould not create large filelarge_archiverZ   rW   Nr[   r?   )i   @r   )rk   emptyuint8MemoryErrorrc   r0  r`   rf   r}   r^   r   r   rx   )r   rx   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)   &C C6D	!C32C36D		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`   rf   r}   rk   r   r   )r   r   npss   &  r*   test_empty_npzrA    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)rj   intu   整形r   zunicode.npyrZ   r   Nr[   )rj   r   r'  rD  r'  )r   r"   )rk   r   rC  r`   rf   r}   r^   r   r;   r=   r   rc   r   r   )r   r?   r   r@   rB   s   &    r*   test_unicode_field_namesrE    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       \        VP                  4       4      V8X  d   Kz  Q h	  K  	  R# u upi )
Frx   ry   r    N)F      )F      )TrJ  rI  )T   rK  )
r   r   GROWTH_AXIS_MAX_DIGITSr   r  rk   r   rC  r   r<   )is_fortran_arraydtype_spaceexpected_header_lengthr   r(   r   s         r*   test_header_growth_axisrQ    s    *O_B='= %*&*G*G$HI$HqRUU$HIDB))"&6!TT1I!1C+$5s#;"<=/  r{{}%)???? JB Js   C	S3somestuff)metadatasubarrayzPyPy bug in error formattingc                    \         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       V! VP                  4      VP                  Jg   Q hV! VP                  4      VP                  J g   Q hR#   + '       g   i     L; i)
   r   N)drop_metadata)rk   rl   r   rc   r   r   r   r_   r   numpy.lib._utils_implrY  r   r   )r   r?   bufrB   rY  s   &    r*   test_metadata_dtyper\    s     ''"B
C
)C	k	"	"
 
#HHQK 773<D3s!#399444$

222 
#	"s   C""C2	)   2   rG   r   r   r   r_  yf8r   zu1)r`  ra  rd  )valuec16)y2rc  nameS2)rj  )rg  rh  r_  )y3rc  r_  )z3u4r_  )z2b1)colorrl  )NameU8)Valuerh  )r   r   )r   r      )r   z<f8rv  r_  )r   r   r   )r      )r   )   )r   rx  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        )   r      )m__doc__r`   r.  r   ior   rc   numpyrk   	numpy.libr   numpy.testingr   r   r   r   r   r	   r
   numpy.testing._private.utilsr   r;  int8uint16int16uint32int32uint64int64float32float64	complex64
complex128rS   scalarsrN   scalarendianr   newbyteorderr   astypebasicextendr   reshapeTPdescrPbufferTNdescrNbufferTr   rO   r    rC   rE   rH   rL   rQ   rT   rX   rh   rq   markskipifslowr   r   r   dt2dt3dt4dt5dt6parametrizer   version_infoxfailr   r   r   r   rC  r   r   r   r   r   r   r  r  r	  r  r  r  r  r  r#  r(  r6  thread_unsafer>  rA  rE  rQ  r   implementationr   r\  r-   r,   r*   <module>r     sO	  Rf 
 
        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=>" ?" C$$/G7#FG) H H) 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 GO4L)FGI&";<  = '  H 5
 ,5.@ HHgSz9rxx!7+8- 0. / 0HHSFG,-HHzC;'(FG3DEHHgSz9rxx3%RXXcB5O4PQR/  	  	 GGG 2 2 : :i G-  /3/	3r,   