From 3fc9075a895c164cc1aac0893f7557f40199de9b Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 26 Jan 2026 11:46:39 -0800 Subject: [PATCH 1/2] Improve function description --- dpnp/dpnp_iface_arraycreation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dpnp/dpnp_iface_arraycreation.py b/dpnp/dpnp_iface_arraycreation.py index 8d4ebdd1a6c2..539df84d3638 100644 --- a/dpnp/dpnp_iface_arraycreation.py +++ b/dpnp/dpnp_iface_arraycreation.py @@ -1721,7 +1721,9 @@ def fromfile( Parameters ---------- file : file or str or Path - Open file object or filename. + An open file object, a string containing the filename, or a Path object. + When reading from a file object it must support random access (i.e. it + must have tell and seek methods). dtype : {None, str, dtype object}, optional Data type of the returned array. For binary files, it is used to determine the size and byte-order From 9b549447043ada022e82e4ec724bd26a84ab7109 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 26 Jan 2026 11:50:34 -0800 Subject: [PATCH 2/2] Add PR to the changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69b06cb64bf8..24a4b9296aa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum * Updated `dpnp.fix` to reuse `dpnp.trunc` internally [#2722](https://github.com/IntelPython/dpnp/pull/2722) * Changed the build scripts and documentation due to `python setup.py develop` deprecation notice [#2716](https://github.com/IntelPython/dpnp/pull/2716) * Clarified behavior on repeated `axes` in `dpnp.tensordot` and `dpnp.linalg.tensordot` functions [#2733](https://github.com/IntelPython/dpnp/pull/2733) +* Improved documentation of `file` argument in `dpnp.fromfile` [#2745](https://github.com/IntelPython/dpnp/pull/2745) ### Deprecated