def load(
    file: str | bytes | PathLike[Any] | BinaryIO,
    *,
    max_header_size: int = 10000,
) -> ndarray:
    """
    Load an array from a ``.npy`` file.

    Parameters
    ----------
    file : file-like object, string, or pathlib.Path
        The file to read. File-like objects must support the
        ``seek()`` and ``read()`` methods and must always
        be opened in binary mode.
    max_header_size : int, optional
        Maximum allowed size of the header.  Large headers may not be safe
        to load securely and thus require explicitly passing a larger value.
        See :py:func:`ast.literal_eval()` for details.

    Returns
    -------
    result : array
        Data stored in the file.

    Raises
    ------
    OSError
        If the input file does not exist or cannot be read.

    See Also
    --------
    numpy.load

    Notes
    -----
    cuPyNumeric does not currently support ``.npz`` and pickled files.

    Availability
    --------
    Single CPU
    """
    return array(
        np.load(
            file,
            max_header_size=max_header_size,  # type: ignore [call-arg]
        )
    )

    Load an array from a ``.npy`` file.

    Parameters
    ----------
    file : file-like object, string, or pathlib.Path
        The file to read. File-like objects must support the
        ``seek()`` and ``read()`` methods and must always
        be opened in binary mode.
    max_header_size : int, optional
        Maximum allowed size of the header.  Large headers may not be safe
        to load securely and thus require explicitly passing a larger value.
        See :py:func:`ast.literal_eval()` for details.

    Returns
    -------
    result : array
        Data stored in the file.

    Raises
    ------
    OSError
        If the input file does not exist or cannot be read.

    See Also
    --------
    numpy.load

    Notes
    -----
    cuPyNumeric does not currently support ``.npz`` and pickled files.

    Availability
    --------
    Single CPU
    
cupynumeric/_module/io_numpy.py