Skip to content
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion src/borrow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
Expand Down
2 changes: 1 addition & 1 deletion src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
2 changes: 1 addition & 1 deletion src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/dtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/npyffi/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _ ),*
Expand Down
4 changes: 2 additions & 2 deletions src/untyped_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down Expand Up @@ -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].
///
Expand Down
Loading