We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unexpected NaN when using big-endian arrays
When a big-endian array is loaded on the GPU using cp.array(), random NaNs appear in the data and calculations will start returning NaN. No errors or warnings are given to the user.


### Conditions
CuPy Version          : 7.6.0
CUDA Root             : /usr/local/cuda
CUDA Build Version    : 9010
CUDA Driver Version   : 10010
CUDA Runtime Version  : 9010
cuBLAS Version        : 9010
cuFFT Version         : 9010
cuRAND Version        : 9010
cuSOLVER Version      : (9, 1, 0)
cuSPARSE Version      : 9010
NVRTC Version         : (9, 1)
cuDNN Build Version   : 7102
cuDNN Version         : 7102
NCCL Build Version    : 2115
NCCL Runtime Version  : (unknown)
CUB Version           : None
cuTENSOR Version      : None

### Code to reproduce
```import cupy as cp
import numpy as np

data = np.arange(1000*1000, dtype='>f4')/1e9
print(' numpy:', type(data), data.shape, data.dtype)
print('   nan:', np.where(np.isnan(data)))
print(' total:', np.sum(data))

arr = cp.array(data)
print('-----')
print('  cupy:' , type(arr), arr.shape, arr.dtype)
print('   nan:' , cp.where(cp.isnan(arr)))
print(' total:', cp.sum(arr))`
```

### Output of the above code:

```
 numpy: <class 'numpy.ndarray'> (1000000,) >f4
   nan: (array([], dtype=int64),)
 total: 499.99963
-----
  cupy: <class 'cupy.core.core.ndarray'> (1000000,) >f4
   nan: (array([   213,    385,    426, ..., 999227, 999242, 999391]),)
 total: nan
```

The numpy array shows no NaNs as expected, while the cupy array on the GPU shows several NaNs and functions like sum() that operate on the whole array return NaN as well.

### Scenarios

A fairly common occurence in a scientific environment is when readings FITS files, which store data big-endian, for example using the astropy.io module:

```
import cupy as cp
from astropy.io import fits

data = fits.getdata(filename)
gpu_data = cp.array(data)        # Results in NaN
```

A workaround is to convert the array to little endian before using it with cupy:

`data = data.astype(np.float32)`



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `cupy/_creation/from_data.py`
Content:
```
1 import numpy
2 
3 from cupy import _core
4 from cupy._core import fusion
5 
6 
7 def array(obj, dtype=None, copy=True, order='K', subok=False, ndmin=0):
8     """Creates an array on the current device.
9 
10     This function currently does not support the ``subok`` option.
11 
12     Args:
13         obj: :class:`cupy.ndarray` object or any other object that can be
14             passed to :func:`numpy.array`.
15         dtype: Data type specifier.
16         copy (bool): If ``False``, this function returns ``obj`` if possible.
17             Otherwise this function always returns a new array.
18         order ({'C', 'F', 'A', 'K'}): Row-major (C-style) or column-major
19             (Fortran-style) order.
20             When ``order`` is ``'A'``, it uses ``'F'`` if ``a`` is column-major
21             and uses ``'C'`` otherwise.
22             And when ``order`` is ``'K'``, it keeps strides as closely as
23             possible.
24             If ``obj`` is :class:`numpy.ndarray`, the function returns ``'C'``
25             or ``'F'`` order array.
26         subok (bool): If ``True``, then sub-classes will be passed-through,
27             otherwise the returned array will be forced to be a base-class
28             array (default).
29         ndmin (int): Minimum number of dimensions. Ones are inserted to the
30             head of the shape if needed.
31 
32     Returns:
33         cupy.ndarray: An array on the current device.
34 
35     .. note::
36        This method currently does not support ``subok`` argument.
37 
38     .. seealso:: :func:`numpy.array`
39 
40     """
41     return _core.array(obj, dtype, copy, order, subok, ndmin)
42 
43 
44 def asarray(a, dtype=None, order=None):
45     """Converts an object to array.
46 
47     This is equivalent to ``array(a, dtype, copy=False)``.
48     This function currently does not support the ``order`` option.
49 
50     Args:
51         a: The source object.
52         dtype: Data type specifier. It is inferred from the input by default.
53         order ({'C', 'F'}):
54             Whether to use row-major (C-style) or column-major (Fortran-style)
55             memory representation. Defaults to ``'C'``. ``order`` is ignored
56             for objects that are not :class:`cupy.ndarray`, but have the
57             ``__cuda_array_interface__`` attribute.
58 
59     Returns:
60         cupy.ndarray: An array on the current device. If ``a`` is already on
61         the device, no copy is performed.
62 
63     .. seealso:: :func:`numpy.asarray`
64 
65     """
66     return _core.array(a, dtype, False, order)
67 
68 
69 def asanyarray(a, dtype=None, order=None):
70     """Converts an object to array.
71 
72     This is currently equivalent to :func:`cupy.asarray`, since there is no
73     subclass of :class:`cupy.ndarray` in CuPy. Note that the original
74     :func:`numpy.asanyarray` returns the input array as is if it is an instance
75     of a subtype of :class:`numpy.ndarray`.
76 
77     .. seealso:: :func:`cupy.asarray`, :func:`numpy.asanyarray`
78 
79     """
80     return _core.array(a, dtype, False, order)
81 
82 
83 def ascontiguousarray(a, dtype=None):
84     """Returns a C-contiguous array.
85 
86     Args:
87         a (cupy.ndarray): Source array.
88         dtype: Data type specifier.
89 
90     Returns:
91         cupy.ndarray: If no copy is required, it returns ``a``. Otherwise, it
92         returns a copy of ``a``.
93 
94     .. seealso:: :func:`numpy.ascontiguousarray`
95 
96     """
97     return _core.ascontiguousarray(a, dtype)
98 
99 
100 # TODO(okuta): Implement asmatrix
101 
102 
103 def copy(a, order='K'):
104     """Creates a copy of a given array on the current device.
105 
106     This function allocates the new array on the current device. If the given
107     array is allocated on the different device, then this function tries to
108     copy the contents over the devices.
109 
110     Args:
111         a (cupy.ndarray): The source array.
112         order ({'C', 'F', 'A', 'K'}): Row-major (C-style) or column-major
113             (Fortran-style) order.
114             When ``order`` is ``'A'``, it uses ``'F'`` if ``a`` is column-major
115             and uses ``'C'`` otherwise.
116             And when ``order`` is ``'K'``, it keeps strides as closely as
117             possible.
118 
119     Returns:
120         cupy.ndarray: The copy of ``a`` on the current device.
121 
122     .. seealso:: :func:`numpy.copy`, :meth:`cupy.ndarray.copy`
123 
124     """
125     if fusion._is_fusing():
126         if order != 'K':
127             raise NotImplementedError(
128                 'cupy.copy does not support `order` in fusion yet.')
129         return fusion._call_ufunc(_core.elementwise_copy, a)
130 
131     # If the current device is different from the device of ``a``, then this
132     # function allocates a new array on the current device, and copies the
133     # contents over the devices.
134     return a.copy(order=order)
135 
136 
137 # TODO(okuta): Implement frombuffer
138 
139 
140 def fromfile(*args, **kwargs):
141     """Reads an array from a file.
142 
143     .. note::
144         Uses NumPy's ``fromfile`` and coerces the result to a CuPy array.
145 
146     .. seealso:: :func:`numpy.fromfile`
147 
148     """
149     return asarray(numpy.fromfile(*args, **kwargs))
150 
151 
152 # TODO(okuta): Implement fromfunction
153 
154 
155 # TODO(okuta): Implement fromiter
156 
157 
158 # TODO(okuta): Implement fromstring
159 
160 
161 # TODO(okuta): Implement loadtxt
162
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/cupy/_creation/from_data.py b/cupy/_creation/from_data.py
--- a/cupy/_creation/from_data.py
+++ b/cupy/_creation/from_data.py
@@ -35,6 +35,11 @@
     .. note::
        This method currently does not support ``subok`` argument.
 
+    .. note::
+       If ``obj`` is an `numpy.ndarray` instance that contains big-endian data,
+       this function automatically swaps its byte order to little-endian,
+       which is the NVIDIA and AMD GPU architecture's native use.
+
     .. seealso:: :func:`numpy.array`
 
     """
@@ -60,6 +65,11 @@
         cupy.ndarray: An array on the current device. If ``a`` is already on
         the device, no copy is performed.
 
+    .. note::
+       If ``a`` is an `numpy.ndarray` instance that contains big-endian data,
+       this function automatically swaps its byte order to little-endian,
+       which is the NVIDIA and AMD GPU architecture's native use.
+
     .. seealso:: :func:`numpy.asarray`
 
     """
@@ -143,6 +153,11 @@
     .. note::
         Uses NumPy's ``fromfile`` and coerces the result to a CuPy array.
 
+    .. note::
+       If you let NumPy's ``fromfile`` read the file in big-endian, CuPy
+       automatically swaps its byte order to little-endian, which is the NVIDIA
+       and AMD GPU architecture's native use.
+
     .. seealso:: :func:`numpy.fromfile`
 
     """

{"golden_diff": "diff --git a/cupy/_creation/from_data.py b/cupy/_creation/from_data.py\n--- a/cupy/_creation/from_data.py\n+++ b/cupy/_creation/from_data.py\n@@ -35,6 +35,11 @@\n     .. note::\n        This method currently does not support ``subok`` argument.\n \n+    .. note::\n+       If ``obj`` is an `numpy.ndarray` instance that contains big-endian data,\n+       this function automatically swaps its byte order to little-endian,\n+       which is the NVIDIA and AMD GPU architecture's native use.\n+\n     .. seealso:: :func:`numpy.array`\n \n     \"\"\"\n@@ -60,6 +65,11 @@\n         cupy.ndarray: An array on the current device. If ``a`` is already on\n         the device, no copy is performed.\n \n+    .. note::\n+       If ``a`` is an `numpy.ndarray` instance that contains big-endian data,\n+       this function automatically swaps its byte order to little-endian,\n+       which is the NVIDIA and AMD GPU architecture's native use.\n+\n     .. seealso:: :func:`numpy.asarray`\n \n     \"\"\"\n@@ -143,6 +153,11 @@\n     .. note::\n         Uses NumPy's ``fromfile`` and coerces the result to a CuPy array.\n \n+    .. note::\n+       If you let NumPy's ``fromfile`` read the file in big-endian, CuPy\n+       automatically swaps its byte order to little-endian, which is the NVIDIA\n+       and AMD GPU architecture's native use.\n+\n     .. seealso:: :func:`numpy.fromfile`\n \n     \"\"\"\n", "issue": "Unexpected NaN when using big-endian arrays\nWhen a big-endian array is loaded on the GPU using cp.array(), random NaNs appear in the data and calculations will start returning NaN. No errors or warnings are given to the user.\r\n\r\n\r\n### Conditions\r\nCuPy Version          : 7.6.0\r\nCUDA Root             : /usr/local/cuda\r\nCUDA Build Version    : 9010\r\nCUDA Driver Version   : 10010\r\nCUDA Runtime Version  : 9010\r\ncuBLAS Version        : 9010\r\ncuFFT Version         : 9010\r\ncuRAND Version        : 9010\r\ncuSOLVER Version      : (9, 1, 0)\r\ncuSPARSE Version      : 9010\r\nNVRTC Version         : (9, 1)\r\ncuDNN Build Version   : 7102\r\ncuDNN Version         : 7102\r\nNCCL Build Version    : 2115\r\nNCCL Runtime Version  : (unknown)\r\nCUB Version           : None\r\ncuTENSOR Version      : None\r\n\r\n### Code to reproduce\r\n```import cupy as cp\r\nimport numpy as np\r\n\r\ndata = np.arange(1000*1000, dtype='>f4')/1e9\r\nprint(' numpy:', type(data), data.shape, data.dtype)\r\nprint('   nan:', np.where(np.isnan(data)))\r\nprint(' total:', np.sum(data))\r\n\r\narr = cp.array(data)\r\nprint('-----')\r\nprint('  cupy:' , type(arr), arr.shape, arr.dtype)\r\nprint('   nan:' , cp.where(cp.isnan(arr)))\r\nprint(' total:', cp.sum(arr))`\r\n```\r\n\r\n### Output of the above code:\r\n\r\n```\r\n numpy: <class 'numpy.ndarray'> (1000000,) >f4\r\n   nan: (array([], dtype=int64),)\r\n total: 499.99963\r\n-----\r\n  cupy: <class 'cupy.core.core.ndarray'> (1000000,) >f4\r\n   nan: (array([   213,    385,    426, ..., 999227, 999242, 999391]),)\r\n total: nan\r\n```\r\n\r\nThe numpy array shows no NaNs as expected, while the cupy array on the GPU shows several NaNs and functions like sum() that operate on the whole array return NaN as well.\r\n\r\n### Scenarios\r\n\r\nA fairly common occurence in a scientific environment is when readings FITS files, which store data big-endian, for example using the astropy.io module:\r\n\r\n```\r\nimport cupy as cp\r\nfrom astropy.io import fits\r\n\r\ndata = fits.getdata(filename)\r\ngpu_data = cp.array(data)        # Results in NaN\r\n```\r\n\r\nA workaround is to convert the array to little endian before using it with cupy:\r\n\r\n`data = data.astype(np.float32)`\r\n\r\n\n", "before_files": [{"content": "import numpy\n\nfrom cupy import _core\nfrom cupy._core import fusion\n\n\ndef array(obj, dtype=None, copy=True, order='K', subok=False, ndmin=0):\n    \"\"\"Creates an array on the current device.\n\n    This function currently does not support the ``subok`` option.\n\n    Args:\n        obj: :class:`cupy.ndarray` object or any other object that can be\n            passed to :func:`numpy.array`.\n        dtype: Data type specifier.\n        copy (bool): If ``False``, this function returns ``obj`` if possible.\n            Otherwise this function always returns a new array.\n        order ({'C', 'F', 'A', 'K'}): Row-major (C-style) or column-major\n            (Fortran-style) order.\n            When ``order`` is ``'A'``, it uses ``'F'`` if ``a`` is column-major\n            and uses ``'C'`` otherwise.\n            And when ``order`` is ``'K'``, it keeps strides as closely as\n            possible.\n            If ``obj`` is :class:`numpy.ndarray`, the function returns ``'C'``\n            or ``'F'`` order array.\n        subok (bool): If ``True``, then sub-classes will be passed-through,\n            otherwise the returned array will be forced to be a base-class\n            array (default).\n        ndmin (int): Minimum number of dimensions. Ones are inserted to the\n            head of the shape if needed.\n\n    Returns:\n        cupy.ndarray: An array on the current device.\n\n    .. note::\n       This method currently does not support ``subok`` argument.\n\n    .. seealso:: :func:`numpy.array`\n\n    \"\"\"\n    return _core.array(obj, dtype, copy, order, subok, ndmin)\n\n\ndef asarray(a, dtype=None, order=None):\n    \"\"\"Converts an object to array.\n\n    This is equivalent to ``array(a, dtype, copy=False)``.\n    This function currently does not support the ``order`` option.\n\n    Args:\n        a: The source object.\n        dtype: Data type specifier. It is inferred from the input by default.\n        order ({'C', 'F'}):\n            Whether to use row-major (C-style) or column-major (Fortran-style)\n            memory representation. Defaults to ``'C'``. ``order`` is ignored\n            for objects that are not :class:`cupy.ndarray`, but have the\n            ``__cuda_array_interface__`` attribute.\n\n    Returns:\n        cupy.ndarray: An array on the current device. If ``a`` is already on\n        the device, no copy is performed.\n\n    .. seealso:: :func:`numpy.asarray`\n\n    \"\"\"\n    return _core.array(a, dtype, False, order)\n\n\ndef asanyarray(a, dtype=None, order=None):\n    \"\"\"Converts an object to array.\n\n    This is currently equivalent to :func:`cupy.asarray`, since there is no\n    subclass of :class:`cupy.ndarray` in CuPy. Note that the original\n    :func:`numpy.asanyarray` returns the input array as is if it is an instance\n    of a subtype of :class:`numpy.ndarray`.\n\n    .. seealso:: :func:`cupy.asarray`, :func:`numpy.asanyarray`\n\n    \"\"\"\n    return _core.array(a, dtype, False, order)\n\n\ndef ascontiguousarray(a, dtype=None):\n    \"\"\"Returns a C-contiguous array.\n\n    Args:\n        a (cupy.ndarray): Source array.\n        dtype: Data type specifier.\n\n    Returns:\n        cupy.ndarray: If no copy is required, it returns ``a``. Otherwise, it\n        returns a copy of ``a``.\n\n    .. seealso:: :func:`numpy.ascontiguousarray`\n\n    \"\"\"\n    return _core.ascontiguousarray(a, dtype)\n\n\n# TODO(okuta): Implement asmatrix\n\n\ndef copy(a, order='K'):\n    \"\"\"Creates a copy of a given array on the current device.\n\n    This function allocates the new array on the current device. If the given\n    array is allocated on the different device, then this function tries to\n    copy the contents over the devices.\n\n    Args:\n        a (cupy.ndarray): The source array.\n        order ({'C', 'F', 'A', 'K'}): Row-major (C-style) or column-major\n            (Fortran-style) order.\n            When ``order`` is ``'A'``, it uses ``'F'`` if ``a`` is column-major\n            and uses ``'C'`` otherwise.\n            And when ``order`` is ``'K'``, it keeps strides as closely as\n            possible.\n\n    Returns:\n        cupy.ndarray: The copy of ``a`` on the current device.\n\n    .. seealso:: :func:`numpy.copy`, :meth:`cupy.ndarray.copy`\n\n    \"\"\"\n    if fusion._is_fusing():\n        if order != 'K':\n            raise NotImplementedError(\n                'cupy.copy does not support `order` in fusion yet.')\n        return fusion._call_ufunc(_core.elementwise_copy, a)\n\n    # If the current device is different from the device of ``a``, then this\n    # function allocates a new array on the current device, and copies the\n    # contents over the devices.\n    return a.copy(order=order)\n\n\n# TODO(okuta): Implement frombuffer\n\n\ndef fromfile(*args, **kwargs):\n    \"\"\"Reads an array from a file.\n\n    .. note::\n        Uses NumPy's ``fromfile`` and coerces the result to a CuPy array.\n\n    .. seealso:: :func:`numpy.fromfile`\n\n    \"\"\"\n    return asarray(numpy.fromfile(*args, **kwargs))\n\n\n# TODO(okuta): Implement fromfunction\n\n\n# TODO(okuta): Implement fromiter\n\n\n# TODO(okuta): Implement fromstring\n\n\n# TODO(okuta): Implement loadtxt\n", "path": "cupy/_creation/from_data.py"}], "after_files": [{"content": "import numpy\n\nfrom cupy import _core\nfrom cupy._core import fusion\n\n\ndef array(obj, dtype=None, copy=True, order='K', subok=False, ndmin=0):\n    \"\"\"Creates an array on the current device.\n\n    This function currently does not support the ``subok`` option.\n\n    Args:\n        obj: :class:`cupy.ndarray` object or any other object that can be\n            passed to :func:`numpy.array`.\n        dtype: Data type specifier.\n        copy (bool): If ``False``, this function returns ``obj`` if possible.\n            Otherwise this function always returns a new array.\n        order ({'C', 'F', 'A', 'K'}): Row-major (C-style) or column-major\n            (Fortran-style) order.\n            When ``order`` is ``'A'``, it uses ``'F'`` if ``a`` is column-major\n            and uses ``'C'`` otherwise.\n            And when ``order`` is ``'K'``, it keeps strides as closely as\n            possible.\n            If ``obj`` is :class:`numpy.ndarray`, the function returns ``'C'``\n            or ``'F'`` order array.\n        subok (bool): If ``True``, then sub-classes will be passed-through,\n            otherwise the returned array will be forced to be a base-class\n            array (default).\n        ndmin (int): Minimum number of dimensions. Ones are inserted to the\n            head of the shape if needed.\n\n    Returns:\n        cupy.ndarray: An array on the current device.\n\n    .. note::\n       This method currently does not support ``subok`` argument.\n\n    .. note::\n       If ``obj`` is an `numpy.ndarray` instance that contains big-endian data,\n       this function automatically swaps its byte order to little-endian,\n       which is the NVIDIA and AMD GPU architecture's native use.\n\n    .. seealso:: :func:`numpy.array`\n\n    \"\"\"\n    return _core.array(obj, dtype, copy, order, subok, ndmin)\n\n\ndef asarray(a, dtype=None, order=None):\n    \"\"\"Converts an object to array.\n\n    This is equivalent to ``array(a, dtype, copy=False)``.\n    This function currently does not support the ``order`` option.\n\n    Args:\n        a: The source object.\n        dtype: Data type specifier. It is inferred from the input by default.\n        order ({'C', 'F'}):\n            Whether to use row-major (C-style) or column-major (Fortran-style)\n            memory representation. Defaults to ``'C'``. ``order`` is ignored\n            for objects that are not :class:`cupy.ndarray`, but have the\n            ``__cuda_array_interface__`` attribute.\n\n    Returns:\n        cupy.ndarray: An array on the current device. If ``a`` is already on\n        the device, no copy is performed.\n\n    .. note::\n       If ``a`` is an `numpy.ndarray` instance that contains big-endian data,\n       this function automatically swaps its byte order to little-endian,\n       which is the NVIDIA and AMD GPU architecture's native use.\n\n    .. seealso:: :func:`numpy.asarray`\n\n    \"\"\"\n    return _core.array(a, dtype, False, order)\n\n\ndef asanyarray(a, dtype=None, order=None):\n    \"\"\"Converts an object to array.\n\n    This is currently equivalent to :func:`cupy.asarray`, since there is no\n    subclass of :class:`cupy.ndarray` in CuPy. Note that the original\n    :func:`numpy.asanyarray` returns the input array as is if it is an instance\n    of a subtype of :class:`numpy.ndarray`.\n\n    .. seealso:: :func:`cupy.asarray`, :func:`numpy.asanyarray`\n\n    \"\"\"\n    return _core.array(a, dtype, False, order)\n\n\ndef ascontiguousarray(a, dtype=None):\n    \"\"\"Returns a C-contiguous array.\n\n    Args:\n        a (cupy.ndarray): Source array.\n        dtype: Data type specifier.\n\n    Returns:\n        cupy.ndarray: If no copy is required, it returns ``a``. Otherwise, it\n        returns a copy of ``a``.\n\n    .. seealso:: :func:`numpy.ascontiguousarray`\n\n    \"\"\"\n    return _core.ascontiguousarray(a, dtype)\n\n\n# TODO(okuta): Implement asmatrix\n\n\ndef copy(a, order='K'):\n    \"\"\"Creates a copy of a given array on the current device.\n\n    This function allocates the new array on the current device. If the given\n    array is allocated on the different device, then this function tries to\n    copy the contents over the devices.\n\n    Args:\n        a (cupy.ndarray): The source array.\n        order ({'C', 'F', 'A', 'K'}): Row-major (C-style) or column-major\n            (Fortran-style) order.\n            When ``order`` is ``'A'``, it uses ``'F'`` if ``a`` is column-major\n            and uses ``'C'`` otherwise.\n            And when ``order`` is ``'K'``, it keeps strides as closely as\n            possible.\n\n    Returns:\n        cupy.ndarray: The copy of ``a`` on the current device.\n\n    .. seealso:: :func:`numpy.copy`, :meth:`cupy.ndarray.copy`\n\n    \"\"\"\n    if fusion._is_fusing():\n        if order != 'K':\n            raise NotImplementedError(\n                'cupy.copy does not support `order` in fusion yet.')\n        return fusion._call_ufunc(_core.elementwise_copy, a)\n\n    # If the current device is different from the device of ``a``, then this\n    # function allocates a new array on the current device, and copies the\n    # contents over the devices.\n    return a.copy(order=order)\n\n\n# TODO(okuta): Implement frombuffer\n\n\ndef fromfile(*args, **kwargs):\n    \"\"\"Reads an array from a file.\n\n    .. note::\n        Uses NumPy's ``fromfile`` and coerces the result to a CuPy array.\n\n    .. note::\n       If you let NumPy's ``fromfile`` read the file in big-endian, CuPy\n       automatically swaps its byte order to little-endian, which is the NVIDIA\n       and AMD GPU architecture's native use.\n\n    .. seealso:: :func:`numpy.fromfile`\n\n    \"\"\"\n    return asarray(numpy.fromfile(*args, **kwargs))\n\n\n# TODO(okuta): Implement fromfunction\n\n\n# TODO(okuta): Implement fromiter\n\n\n# TODO(okuta): Implement fromstring\n\n\n# TODO(okuta): Implement loadtxt\n", "path": "cupy/_creation/from_data.py"}]}