Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fixing various spelling errors #28569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 doc/neps/nep-0021-advanced-indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ be deduced:
no transposing should be done. The axes created by the integer array
indices are always inserted at the front, even for a single index.

4. Boolean indexing is conceptionally outer indexing. Broadcasting
4. Boolean indexing is conceptually outer indexing. Broadcasting
together with other advanced indices in the manner of legacy
indexing is generally not helpful or well defined.
A user who wishes the "``nonzero``" plus broadcast behaviour can thus
Expand Down
2 changes: 1 addition & 1 deletion 2 doc/release/upcoming_changes/28254.expired.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Remove alias ``generate_divbyzero_error`` to ``npy_set_floatstatus_divbyzero`` and ``generate_overflow_error`` to ``npy_set_floatstatus_overflow`` (deprecated since 1.10)
* Remove ``np.tostring`` (deprecated since 1.19)
* Raise on ``np.conjugate`` of non-numeric types (deprecated since 1.13)
* Raise when using ``np.bincount(...minlength=None)``, use 0 intead (deprecated since 1.14)
* Raise when using ``np.bincount(...minlength=None)``, use 0 instead (deprecated since 1.14)
* Passing ``shape=None`` to functions with a non-optional shape argument errors, use ``()`` instead (deprecated since 1.20)
* Inexact matches for ``mode`` and ``searchside`` raise (deprecated since 1.20)
* Setting ``__array_finalize__ = None`` errors (deprecated since 1.23)
Expand Down
2 changes: 2 additions & 0 deletions 2 doc/release/upcoming_changes/28569.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* A spelling error in the error message returned when converting a string to a float with the
method ``np.format_float_positional`` has been fixed.
8 changes: 4 additions & 4 deletions 8 numpy/_core/src/multiarray/dragon4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ FormatPositional(char *buffer, npy_uint32 bufferSize, BigInt *mantissa,
pos += numDigits;

if (count > maxPrintLen - pos) {
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
return -1;
}

Expand Down Expand Up @@ -1772,7 +1772,7 @@ FormatPositional(char *buffer, npy_uint32 bufferSize, BigInt *mantissa,
npy_int32 count = desiredFractionalDigits - numFractionDigits;

if (count > maxPrintLen - pos) {
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
return -1;
}
numFractionDigits += count;
Expand Down Expand Up @@ -1816,7 +1816,7 @@ FormatPositional(char *buffer, npy_uint32 bufferSize, BigInt *mantissa,
}

if (count > maxPrintLen - pos) {
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
return -1;
}

Expand All @@ -1830,7 +1830,7 @@ FormatPositional(char *buffer, npy_uint32 bufferSize, BigInt *mantissa,
npy_int32 count = pos;

if (count > maxPrintLen - shift) {
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
return -1;
}

Expand Down
6 changes: 3 additions & 3 deletions 6 numpy/_core/tests/test_scalarprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ def test_dragon4_positional_interface_overflow(self, tp, pad_val):

#gh-28068
with pytest.raises(RuntimeError,
match="Float formating result too large"):
match="Float formatting result too large"):
fpos(tp('1.047'), unique=False, precision=pad_val)

with pytest.raises(RuntimeError,
match="Float formating result too large"):
match="Float formatting result too large"):
fpos(tp('1.047'), precision=2, pad_left=pad_val)

with pytest.raises(RuntimeError,
match="Float formating result too large"):
match="Float formatting result too large"):
fpos(tp('1.047'), precision=2, pad_right=pad_val)

@pytest.mark.parametrize("tp", available_float_dtypes)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.