Skip to content

Commit a502bc2

Browse files
MAINT: Fix a few more typos
Signed-off-by: Dimitri Papadopoulos <[email protected]>
1 parent 0b12a62 commit a502bc2

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

.github/workflows/linux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ jobs:
274274
pip install vulture
275275
- name: Build and install NumPy
276276
run: |
277-
# Install using the fastests way to build (no BLAS, no SIMD)
277+
# Install using the fastest way to build (no BLAS, no SIMD)
278278
spin build -j2 -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
279279
- name: Check build-internal dependencies
280280
run: |

meson_cpu/main_config.h.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
#ifndef @P@_CPU_DISPATCHER_CONF_H_
1313
#define @P@_CPU_DISPATCHER_CONF_H_
14-
/// This definition is required to provide comptibility with NumPy distutils
14+
/// This definition is required to provide compatibility with NumPy distutils
1515
#define @P@_CPU_MESON_BUILD
1616
/**
1717
* @def @P@WITH_CPU_BASELINE
@@ -46,7 +46,7 @@
4646
/**
4747
* @def @P@WITH_CPU_BASELINE_CALL(EXEC_CB, ...)
4848
* Call each enabled baseline feature sorted by lowest interest
49-
* using preprocessor callback without testing whiher the
49+
* using preprocessor callback without testing whether the
5050
* feature is supported by CPU or not.
5151
*
5252
* Required for logging purposes only, for example, generating

numpy/_core/src/common/simd/avx2/memory.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ NPYV_IMPL_AVX2_REST_PARTIAL_TYPES_PAIR(u64, s64)
705705
NPYV_IMPL_AVX2_REST_PARTIAL_TYPES_PAIR(f64, s64)
706706

707707
/************************************************************
708-
* de-interlave load / interleave contiguous store
708+
* de-interleave load / interleave contiguous store
709709
************************************************************/
710710
// two channels
711711
#define NPYV_IMPL_AVX2_MEM_INTERLEAVE(SFX, ZSFX) \

numpy/_core/src/common/simd/avx512/memory.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ NPYV_IMPL_AVX512_REST_PARTIAL_TYPES_PAIR(u64, s64)
651651
NPYV_IMPL_AVX512_REST_PARTIAL_TYPES_PAIR(f64, s64)
652652

653653
/************************************************************
654-
* de-interlave load / interleave contiguous store
654+
* de-interleave load / interleave contiguous store
655655
************************************************************/
656656
// two channels
657657
#define NPYV_IMPL_AVX512_MEM_INTERLEAVE(SFX, ZSFX) \

numpy/_core/src/common/simd/neon/memory.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ NPYV_IMPL_NEON_REST_PARTIAL_TYPES_PAIR(f64, s64)
584584
#endif
585585

586586
/************************************************************
587-
* de-interlave load / interleave contiguous store
587+
* de-interleave load / interleave contiguous store
588588
************************************************************/
589589
// two channels
590590
#define NPYV_IMPL_NEON_MEM_INTERLEAVE(SFX, T_PTR) \

numpy/_core/src/common/simd/sse/memory.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ NPYV_IMPL_SSE_REST_PARTIAL_TYPES_PAIR(u64, s64)
683683
NPYV_IMPL_SSE_REST_PARTIAL_TYPES_PAIR(f64, s64)
684684

685685
/************************************************************
686-
* de-interlave load / interleave contiguous store
686+
* de-interleave load / interleave contiguous store
687687
************************************************************/
688688
// two channels
689689
#define NPYV_IMPL_SSE_MEM_INTERLEAVE(SFX, ZSFX) \

numpy/_core/src/common/simd/vec/memory.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ NPYV_IMPL_VEC_REST_PARTIAL_TYPES_PAIR(u64, s64)
623623
NPYV_IMPL_VEC_REST_PARTIAL_TYPES_PAIR(f64, s64)
624624

625625
/************************************************************
626-
* de-interlave load / interleave contiguous store
626+
* de-interleave load / interleave contiguous store
627627
************************************************************/
628628
// two channels
629629
#define NPYV_IMPL_VEC_MEM_INTERLEAVE(SFX) \

numpy/_core/tests/test_half.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def setup_method(self):
2222
self.all_f16 = np.arange(0x10000, dtype=uint16)
2323
self.all_f16.dtype = float16
2424

25-
# NaN value can cause an invalid FP exception if HW is been used
25+
# NaN value can cause an invalid FP exception if HW is being used
2626
with np.errstate(invalid='ignore'):
2727
self.all_f32 = np.array(self.all_f16, dtype=float32)
2828
self.all_f64 = np.array(self.all_f16, dtype=float64)
@@ -49,7 +49,7 @@ def test_half_conversions(self):
4949
# Convert from float32 back to float16
5050
with np.errstate(invalid='ignore'):
5151
b = np.array(self.all_f32, dtype=float16)
52-
# avoid testing NaNs due to differ bits wither Q/SNaNs
52+
# avoid testing NaNs due to differing bit patterns in Q/S NaNs
5353
b_nn = b == b
5454
assert_equal(self.all_f16[b_nn].view(dtype=uint16),
5555
b[b_nn].view(dtype=uint16))
@@ -119,8 +119,8 @@ def test_half_conversion_rounding(self, float_t, shift, offset):
119119
# Convert back to float16 and its bit pattern:
120120
res_patterns = f16s_float.astype(np.float16).view(np.uint16)
121121

122-
# The above calculations tries the original values, or the exact
123-
# mid points between the float16 values. It then further offsets them
122+
# The above calculation tries the original values, or the exact
123+
# midpoints between the float16 values. It then further offsets them
124124
# by as little as possible. If no offset occurs, "round to even"
125125
# logic will be necessary, an arbitrarily small offset should cause
126126
# normal up/down rounding always.

numpy/lib/_function_base_impl.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
# get_virtual_index : Callable
6363
# The function used to compute the virtual_index.
6464
# fix_gamma : Callable
65-
# A function used for discret methods to force the index to a specific value.
65+
# A function used for discrete methods to force the index to a specific value.
6666
_QuantileMethods = dict(
6767
# --- HYNDMAN and FAN METHODS
6868
# Discrete methods
@@ -4633,7 +4633,7 @@ def _get_gamma_mask(shape, default_value, conditioned_value, where):
46334633
return out
46344634

46354635

4636-
def _discret_interpolation_to_boundaries(index, gamma_condition_fun):
4636+
def _discrete_interpolation_to_boundaries(index, gamma_condition_fun):
46374637
previous = np.floor(index)
46384638
next = previous + 1
46394639
gamma = index - previous
@@ -4651,14 +4651,14 @@ def _closest_observation(n, quantiles):
46514651
# "choose the nearest even order statistic at g=0" (H&F (1996) pp. 362).
46524652
# Order is 1-based so for zero-based indexing round to nearest odd index.
46534653
gamma_fun = lambda gamma, index: (gamma == 0) & (np.floor(index) % 2 == 1)
4654-
return _discret_interpolation_to_boundaries((n * quantiles) - 1 - 0.5,
4655-
gamma_fun)
4654+
return _discrete_interpolation_to_boundaries((n * quantiles) - 1 - 0.5,
4655+
gamma_fun)
46564656

46574657

46584658
def _inverted_cdf(n, quantiles):
46594659
gamma_fun = lambda gamma, _: (gamma == 0)
4660-
return _discret_interpolation_to_boundaries((n * quantiles) - 1,
4661-
gamma_fun)
4660+
return _discrete_interpolation_to_boundaries((n * quantiles) - 1,
4661+
gamma_fun)
46624662

46634663

46644664
def _quantile_ureduce_func(

0 commit comments

Comments
 (0)