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: 0 additions & 2 deletions src/array_approx.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#[cfg(feature = "approx")]
#[cfg_attr(docsrs, doc(cfg(feature = "approx")))]
mod approx_methods
{
use crate::imp_prelude::*;
Expand Down Expand Up @@ -244,5 +243,4 @@ macro_rules! impl_approx_traits {
}

#[cfg(feature = "approx")]
#[cfg_attr(docsrs, doc(cfg(feature = "approx")))]
impl_approx_traits!(approx, "**Requires crate feature `\"approx\"`.**");
1 change: 0 additions & 1 deletion src/arraytraits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ unsafe impl<A, D> Sync for ArrayRef<A, D> where A: Sync {}
unsafe impl<A, D> Send for ArrayRef<A, D> where A: Send {}

#[cfg(feature = "serde")]
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
// Use version number so we can add a packed format later.
pub const ARRAY_FORMAT_VERSION: u8 = 1u8;

Expand Down
1 change: 0 additions & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ impl PartialEq for ShapeError
}

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl Error for ShapeError {}

impl fmt::Display for ShapeError
Expand Down
4 changes: 0 additions & 4 deletions src/impl_constructors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ where S: DataOwned<Elem = A>
/// assert!(array == arr1(&[0.0, 0.25, 0.5, 0.75, 1.0]))
/// ```
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn linspace(start: A, end: A, n: usize) -> Self
where A: Float
{
Expand All @@ -118,7 +117,6 @@ where S: DataOwned<Elem = A>
/// assert!(array == arr1(&[0., 1., 2., 3., 4.]))
/// ```
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn range(start: A, end: A, step: A) -> Self
where A: Float
{
Expand Down Expand Up @@ -147,7 +145,6 @@ where S: DataOwned<Elem = A>
/// # }
/// ```
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn logspace(base: A, start: A, end: A, n: usize) -> Self
where A: Float
{
Expand Down Expand Up @@ -182,7 +179,6 @@ where S: DataOwned<Elem = A>
/// # example().unwrap();
/// ```
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn geomspace(start: A, end: A, n: usize) -> Option<Self>
where A: Float
{
Expand Down
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
// Enable the doc_cfg nightly feature for including feature gate flags in the documentation
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, doc(auto_cfg))]
#![warn(missing_docs)]

//! The `ndarray` crate provides an *n*-dimensional container for general elements
Expand Down Expand Up @@ -158,7 +159,6 @@ use crate::iterators::{ElementsBase, ElementsBaseMut};
pub use crate::arraytraits::AsArray;
pub use crate::linalg_traits::LinalgScalar;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub use crate::linalg_traits::NdFloat;

pub use crate::stacking::{concatenate, stack};
Expand Down Expand Up @@ -201,11 +201,9 @@ mod layout;
mod linalg_traits;
mod linspace;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub use crate::linspace::{linspace, range, Linspace};
mod logspace;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub use crate::logspace::{logspace, Logspace};
mod math_cell;
mod numeric_util;
Expand Down Expand Up @@ -1841,7 +1839,6 @@ where

// parallel methods
#[cfg(feature = "rayon")]
#[cfg_attr(docsrs, doc(cfg(feature = "rayon")))]
pub mod parallel;

mod impl_1d;
Expand Down
3 changes: 0 additions & 3 deletions src/linalg_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ impl<T> LinalgScalar for T where T: 'static + Copy + Zero + One + Add<Output = T
///
/// **Requires default crate feature `"std"`**
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub trait NdFloat:
Float
+ AddAssign
Expand All @@ -62,8 +61,6 @@ pub trait NdFloat:
}

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl NdFloat for f32 {}
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl NdFloat for f64 {}
1 change: 0 additions & 1 deletion src/numeric/impl_float_maths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ macro_rules! binary_ops {
///
/// Element-wise math functions for any array type that contains float number.
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
impl<A, D> ArrayRef<A, D>
where
A: 'static + Float,
Expand Down
4 changes: 0 additions & 4 deletions src/numeric/impl_numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ where D: Dimension
/// ```
#[track_caller]
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn var(&self, ddof: A) -> A
where A: Float + FromPrimitive
{
Expand Down Expand Up @@ -243,7 +242,6 @@ where D: Dimension
/// ```
#[track_caller]
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn std(&self, ddof: A) -> A
where A: Float + FromPrimitive
{
Expand Down Expand Up @@ -400,7 +398,6 @@ where D: Dimension
/// ```
#[track_caller]
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn var_axis(&self, axis: Axis, ddof: A) -> Array<A, D::Smaller>
where
A: Float + FromPrimitive,
Expand Down Expand Up @@ -471,7 +468,6 @@ where D: Dimension
/// ```
#[track_caller]
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub fn std_axis(&self, axis: Axis, ddof: A) -> Array<A, D::Smaller>
where
A: Float + FromPrimitive,
Expand Down
3 changes: 0 additions & 3 deletions src/partial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ impl<T> Partial<T>
}

#[cfg(feature = "rayon")]
#[cfg_attr(docsrs, doc(cfg(feature = "rayon")))]
pub(crate) fn stub() -> Self
{
Self {
Expand All @@ -47,7 +46,6 @@ impl<T> Partial<T>
}

#[cfg(feature = "rayon")]
#[cfg_attr(docsrs, doc(cfg(feature = "rayon")))]
pub(crate) fn is_stub(&self) -> bool
{
self.ptr.is_null()
Expand All @@ -62,7 +60,6 @@ impl<T> Partial<T>
}

#[cfg(feature = "rayon")]
#[cfg_attr(docsrs, doc(cfg(feature = "rayon")))]
/// Merge if they are in order (left to right) and contiguous.
/// Skips merge if T does not need drop.
pub(crate) fn try_merge(mut left: Self, right: Self) -> Self
Expand Down