diff --git a/CHANGELOG.md b/CHANGELOG.md index 1efb05ef3..fef17a89e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,7 +72,7 @@ - v0.17.0 - Add dynamic borrow checking to safely construct references into the interior of NumPy arrays. ([#274](https://github.com/PyO3/rust-numpy/pull/274)) - - The deprecated iterator builders `NpySingleIterBuilder::{readonly,readwrite}` and `NpyMultiIterBuilder::add_{readonly,readwrite}` now take referencces to `PyReadonlyArray` and `PyReadwriteArray` instead of consuming them. + - The deprecated iterator builders `NpySingleIterBuilder::{readonly,readwrite}` and `NpyMultiIterBuilder::add_{readonly,readwrite}` now take references to `PyReadonlyArray` and `PyReadwriteArray` instead of consuming them. - The destructive `PyArray::resize` method is now unsafe if used without an instance of `PyReadwriteArray`. ([#302](https://github.com/PyO3/rust-numpy/pull/302)) - Add support for `datetime64` and `timedelta64` element types via the `datetime` module. ([#308](https://github.com/PyO3/rust-numpy/pull/308)) - 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)) diff --git a/examples/simple/src/lib.rs b/examples/simple/src/lib.rs index a0f05ce06..9f096e70f 100644 --- a/examples/simple/src/lib.rs +++ b/examples/simple/src/lib.rs @@ -108,7 +108,7 @@ mod rust_ext { // This crate follows a strongly-typed approach to wrapping NumPy arrays // while Python API are often expected to work with multiple element types. // - // That kind of limited polymorphis can be recovered by accepting an enumerated type + // That kind of limited polymorphism can be recovered by accepting an enumerated type // covering the supported element types and dispatching into a generic implementation. #[derive(FromPyObject)] enum SupportedArray<'py> { diff --git a/src/borrow/mod.rs b/src/borrow/mod.rs index a22544d7f..e29ab2b11 100644 --- a/src/borrow/mod.rs +++ b/src/borrow/mod.rs @@ -5,7 +5,7 @@ //! safe Rust code cannot cause undefined behaviour by creating references into NumPy arrays. //! //! With these borrows established, [references to individual elements][PyReadonlyArray::get] or [reference-based views of whole array][PyReadonlyArray::as_array] -//! can be created safely. These are then the starting point for algorithms iteraing over and operating on the elements of the array. +//! can be created safely. These are then the starting point for algorithms iterating over and operating on the elements of the array. //! //! # Examples //! diff --git a/src/convert.rs b/src/convert.rs index 7165f2391..dfb59d396 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -110,7 +110,7 @@ where /// }); /// ``` /// -/// Due to copying the elments, this method converts non-contiguous arrays to C-order contiguous arrays. +/// Due to copying the elements, this method converts non-contiguous arrays to C-order contiguous arrays. /// /// ``` /// use numpy::prelude::*; diff --git a/src/datetime.rs b/src/datetime.rs index d5e65618a..cdd66b16e 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -78,7 +78,7 @@ pub trait Unit: Send + Sync + Clone + Copy + PartialEq + Eq + Hash + PartialOrd /// [NPY_DATETIMEUNIT]: https://github.com/numpy/numpy/blob/4c60b3263ac50e5e72f6a909e156314fc3c9cba0/numpy/core/include/numpy/ndarraytypes.h#L276 const UNIT: NPY_DATETIMEUNIT; - /// The abbrevation used for debug formatting + /// The abbreviation used for debug formatting const ABBREV: &'static str; } diff --git a/src/dtype.rs b/src/dtype.rs index 6a39bb2b2..b6316161c 100644 --- a/src/dtype.rs +++ b/src/dtype.rs @@ -445,7 +445,7 @@ impl Sealed for Bound<'_, PyArrayDescr> {} /// containing object-type fields) are assumed to be trivially copyable, which /// is reflected in the `IS_COPY` flag. Furthermore, it is assumed that for /// the object type the elements are pointers into the Python heap and that the -/// corresponding `Clone` implemenation will never panic as it only increases +/// corresponding `Clone` implementation will never panic as it only increases /// the reference count. /// /// # Custom element types diff --git a/src/npyffi/array.rs b/src/npyffi/array.rs index 4c337de74..c81a0550a 100644 --- a/src/npyffi/array.rs +++ b/src/npyffi/array.rs @@ -406,7 +406,7 @@ macro_rules! impl_array_type { pub enum NpyTypes { $($tname),* } impl PyArrayAPI { - /// Get a pointer of the type object assocaited with `ty`. + /// Get a pointer of the type object associated with `ty`. pub unsafe fn get_type_object<'py>(&self, py: Python<'py>, ty: NpyTypes) -> *mut PyTypeObject { match ty { $( NpyTypes::$tname => *(self.get(py, $offset)) as _ ),* diff --git a/src/untyped_array.rs b/src/untyped_array.rs index 2db8c1e6a..7293b9119 100644 --- a/src/untyped_array.rs +++ b/src/untyped_array.rs @@ -136,7 +136,7 @@ pub trait PyUntypedArrayMethods<'py>: Sealed { } /// Returns `true` if the internal data of the array is contiguous, - /// indepedently of whether C-style/row-major or Fortran-style/column-major. + /// independently of whether C-style/row-major or Fortran-style/column-major. /// /// # Example /// @@ -232,7 +232,7 @@ pub trait PyUntypedArrayMethods<'py>: Sealed { } } - /// Returns a slice which contains dimmensions of the array. + /// Returns a slice which contains dimensions of the array. /// /// See also [`ndarray.shape`][ndaray-shape] and [`PyArray_DIMS`][PyArray_DIMS]. ///