Skip to content

Commit 198809a

Browse files
fix a couple of typos (#528)
1 parent 28dfb24 commit 198809a

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
- v0.17.0
7474
- Add dynamic borrow checking to safely construct references into the interior of NumPy arrays. ([#274](https://github.com/PyO3/rust-numpy/pull/274))
75-
- The deprecated iterator builders `NpySingleIterBuilder::{readonly,readwrite}` and `NpyMultiIterBuilder::add_{readonly,readwrite}` now take referencces to `PyReadonlyArray` and `PyReadwriteArray` instead of consuming them.
75+
- The deprecated iterator builders `NpySingleIterBuilder::{readonly,readwrite}` and `NpyMultiIterBuilder::add_{readonly,readwrite}` now take references to `PyReadonlyArray` and `PyReadwriteArray` instead of consuming them.
7676
- The destructive `PyArray::resize` method is now unsafe if used without an instance of `PyReadwriteArray`. ([#302](https://github.com/PyO3/rust-numpy/pull/302))
7777
- Add support for `datetime64` and `timedelta64` element types via the `datetime` module. ([#308](https://github.com/PyO3/rust-numpy/pull/308))
7878
- Add support for IEEE 754-2008 16-bit floating point numbers via an optional dependency on the `half` crate. ([#314](https://github.com/PyO3/rust-numpy/pull/314))

examples/simple/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ mod rust_ext {
108108
// This crate follows a strongly-typed approach to wrapping NumPy arrays
109109
// while Python API are often expected to work with multiple element types.
110110
//
111-
// That kind of limited polymorphis can be recovered by accepting an enumerated type
111+
// That kind of limited polymorphism can be recovered by accepting an enumerated type
112112
// covering the supported element types and dispatching into a generic implementation.
113113
#[derive(FromPyObject)]
114114
enum SupportedArray<'py> {

src/borrow/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! safe Rust code cannot cause undefined behaviour by creating references into NumPy arrays.
66
//!
77
//! With these borrows established, [references to individual elements][PyReadonlyArray::get] or [reference-based views of whole array][PyReadonlyArray::as_array]
8-
//! can be created safely. These are then the starting point for algorithms iteraing over and operating on the elements of the array.
8+
//! can be created safely. These are then the starting point for algorithms iterating over and operating on the elements of the array.
99
//!
1010
//! # Examples
1111
//!

src/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ where
110110
/// });
111111
/// ```
112112
///
113-
/// Due to copying the elments, this method converts non-contiguous arrays to C-order contiguous arrays.
113+
/// Due to copying the elements, this method converts non-contiguous arrays to C-order contiguous arrays.
114114
///
115115
/// ```
116116
/// use numpy::prelude::*;

src/datetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub trait Unit: Send + Sync + Clone + Copy + PartialEq + Eq + Hash + PartialOrd
7878
/// [NPY_DATETIMEUNIT]: https://github.com/numpy/numpy/blob/4c60b3263ac50e5e72f6a909e156314fc3c9cba0/numpy/core/include/numpy/ndarraytypes.h#L276
7979
const UNIT: NPY_DATETIMEUNIT;
8080

81-
/// The abbrevation used for debug formatting
81+
/// The abbreviation used for debug formatting
8282
const ABBREV: &'static str;
8383
}
8484

src/dtype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ impl Sealed for Bound<'_, PyArrayDescr> {}
445445
/// containing object-type fields) are assumed to be trivially copyable, which
446446
/// is reflected in the `IS_COPY` flag. Furthermore, it is assumed that for
447447
/// the object type the elements are pointers into the Python heap and that the
448-
/// corresponding `Clone` implemenation will never panic as it only increases
448+
/// corresponding `Clone` implementation will never panic as it only increases
449449
/// the reference count.
450450
///
451451
/// # Custom element types

src/npyffi/array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ macro_rules! impl_array_type {
406406
pub enum NpyTypes { $($tname),* }
407407

408408
impl PyArrayAPI {
409-
/// Get a pointer of the type object assocaited with `ty`.
409+
/// Get a pointer of the type object associated with `ty`.
410410
pub unsafe fn get_type_object<'py>(&self, py: Python<'py>, ty: NpyTypes) -> *mut PyTypeObject {
411411
match ty {
412412
$( NpyTypes::$tname => *(self.get(py, $offset)) as _ ),*

src/untyped_array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub trait PyUntypedArrayMethods<'py>: Sealed {
136136
}
137137

138138
/// Returns `true` if the internal data of the array is contiguous,
139-
/// indepedently of whether C-style/row-major or Fortran-style/column-major.
139+
/// independently of whether C-style/row-major or Fortran-style/column-major.
140140
///
141141
/// # Example
142142
///
@@ -232,7 +232,7 @@ pub trait PyUntypedArrayMethods<'py>: Sealed {
232232
}
233233
}
234234

235-
/// Returns a slice which contains dimmensions of the array.
235+
/// Returns a slice which contains dimensions of the array.
236236
///
237237
/// See also [`ndarray.shape`][ndaray-shape] and [`PyArray_DIMS`][PyArray_DIMS].
238238
///

0 commit comments

Comments
 (0)