Skip to content

Commit 2a6f4f0

Browse files
authored
Merge pull request numpy#28569 from john-science/fix_spelling
Fixing various spelling errors
2 parents 09a707f + 017809b commit 2a6f4f0

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

doc/neps/nep-0021-advanced-indexing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ be deduced:
219219
no transposing should be done. The axes created by the integer array
220220
indices are always inserted at the front, even for a single index.
221221

222-
4. Boolean indexing is conceptionally outer indexing. Broadcasting
222+
4. Boolean indexing is conceptually outer indexing. Broadcasting
223223
together with other advanced indices in the manner of legacy
224224
indexing is generally not helpful or well defined.
225225
A user who wishes the "``nonzero``" plus broadcast behaviour can thus

doc/release/upcoming_changes/28254.expired.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Remove alias ``generate_divbyzero_error`` to ``npy_set_floatstatus_divbyzero`` and ``generate_overflow_error`` to ``npy_set_floatstatus_overflow`` (deprecated since 1.10)
44
* Remove ``np.tostring`` (deprecated since 1.19)
55
* Raise on ``np.conjugate`` of non-numeric types (deprecated since 1.13)
6-
* Raise when using ``np.bincount(...minlength=None)``, use 0 intead (deprecated since 1.14)
6+
* Raise when using ``np.bincount(...minlength=None)``, use 0 instead (deprecated since 1.14)
77
* Passing ``shape=None`` to functions with a non-optional shape argument errors, use ``()`` instead (deprecated since 1.20)
88
* Inexact matches for ``mode`` and ``searchside`` raise (deprecated since 1.20)
99
* Setting ``__array_finalize__ = None`` errors (deprecated since 1.23)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* A spelling error in the error message returned when converting a string to a float with the
2+
method ``np.format_float_positional`` has been fixed.

numpy/_core/src/multiarray/dragon4.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,7 @@ FormatPositional(char *buffer, npy_uint32 bufferSize, BigInt *mantissa,
16651665
pos += numDigits;
16661666

16671667
if (count > maxPrintLen - pos) {
1668-
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
1668+
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
16691669
return -1;
16701670
}
16711671

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

17741774
if (count > maxPrintLen - pos) {
1775-
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
1775+
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
17761776
return -1;
17771777
}
17781778
numFractionDigits += count;
@@ -1816,7 +1816,7 @@ FormatPositional(char *buffer, npy_uint32 bufferSize, BigInt *mantissa,
18161816
}
18171817

18181818
if (count > maxPrintLen - pos) {
1819-
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
1819+
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
18201820
return -1;
18211821
}
18221822

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

18321832
if (count > maxPrintLen - shift) {
1833-
PyErr_SetString(PyExc_RuntimeError, "Float formating result too large");
1833+
PyErr_SetString(PyExc_RuntimeError, "Float formatting result too large");
18341834
return -1;
18351835
}
18361836

numpy/_core/tests/test_scalarprint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,15 @@ def test_dragon4_positional_interface_overflow(self, tp, pad_val):
277277

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

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

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

291291
@pytest.mark.parametrize("tp", available_float_dtypes)

0 commit comments

Comments
 (0)