Skip to content

Change macro_use to normal use #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2019
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
4 changes: 4 additions & 0 deletions src/correlation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ where
#[cfg(test)]
mod cov_tests {
use super::*;
use ndarray::array;
use quickcheck::quickcheck;
use rand;
use rand::distributions::Uniform;
use ndarray_rand::RandomExt;
Expand Down Expand Up @@ -278,6 +280,8 @@ mod cov_tests {
#[cfg(test)]
mod pearson_correlation_tests {
use super::*;
use ndarray::array;
use quickcheck::quickcheck;
use rand::distributions::Uniform;
use ndarray_rand::RandomExt;

Expand Down
1 change: 1 addition & 0 deletions src/histogram/bins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ impl<A: Ord> Bins<A> {
#[cfg(test)]
mod edges_tests {
use super::*;
use quickcheck::quickcheck;
use std::collections::BTreeSet;
use std::iter::FromIterator;

Expand Down
5 changes: 5 additions & 0 deletions src/histogram/strategies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ mod equispaced_tests {
#[cfg(test)]
mod sqrt_tests {
use super::*;
use ndarray::array;

#[should_panic]
#[test]
Expand All @@ -443,6 +444,7 @@ mod sqrt_tests {
#[cfg(test)]
mod rice_tests {
use super::*;
use ndarray::array;

#[should_panic]
#[test]
Expand All @@ -460,6 +462,7 @@ mod rice_tests {
#[cfg(test)]
mod sturges_tests {
use super::*;
use ndarray::array;

#[should_panic]
#[test]
Expand All @@ -477,6 +480,7 @@ mod sturges_tests {
#[cfg(test)]
mod fd_tests {
use super::*;
use ndarray::array;

#[should_panic]
#[test]
Expand All @@ -500,6 +504,7 @@ mod fd_tests {
#[cfg(test)]
mod auto_tests {
use super::*;
use ndarray::array;

#[should_panic]
#[test]
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
//! [`StatsBase.jl`]: https://juliastats.github.io/StatsBase.jl/latest/


#[macro_use(azip, s)]
#[cfg_attr(test, macro_use(array))]
extern crate ndarray;
extern crate noisy_float;
extern crate num_traits;
Expand All @@ -35,10 +33,8 @@ extern crate itertools;
#[cfg(test)]
extern crate ndarray_rand;
#[cfg(test)]
#[macro_use(quickcheck)]
extern crate quickcheck;
#[cfg(test)]
#[macro_use(abs_diff_eq)]
extern crate approx;

pub use maybe_nan::{MaybeNan, MaybeNanExt};
Expand Down
3 changes: 2 additions & 1 deletion src/maybe_nan/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ndarray::prelude::*;
use ndarray::{Data, DataMut, RemoveAxis};
use ndarray::{s, Data, DataMut, RemoveAxis};
use noisy_float::types::{N32, N64};

/// A number type that can have not-a-number values.
Expand Down Expand Up @@ -347,6 +347,7 @@ where
#[cfg(test)]
mod tests {
use super::*;
use quickcheck::quickcheck;

quickcheck! {
fn remove_nan_mut_idempotent(is_nan: Vec<bool>) -> bool {
Expand Down
3 changes: 2 additions & 1 deletion src/quantile.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use interpolate::Interpolate;
use ndarray::prelude::*;
use ndarray::{Data, DataMut, RemoveAxis};
use ndarray::{s, Data, DataMut, RemoveAxis};
use std::cmp;
use {MaybeNan, MaybeNanExt, Sort1dExt};

/// Interpolation strategies.
pub mod interpolate {
use ndarray::azip;
use ndarray::prelude::*;
use num_traits::{FromPrimitive, ToPrimitive};
use std::ops::{Add, Div};
Expand Down
2 changes: 1 addition & 1 deletion src/sort.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ndarray::prelude::*;
use ndarray::{Data, DataMut};
use ndarray::{s, Data, DataMut};
use rand::prelude::*;
use rand::thread_rng;

Expand Down
3 changes: 2 additions & 1 deletion src/summary_statistics/means.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ where
mod tests {
use super::SummaryStatisticsExt;
use std::f64;
use approx::abs_diff_eq;
use noisy_float::types::N64;
use ndarray::Array1;
use ndarray::{array, Array1};

#[test]
fn test_means_with_nan_values() {
Expand Down