Skip to content

Commit

Permalink
Merge branch 'hotfix' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Axect committed Nov 4, 2022
2 parents 4c782d3 + 1ff9829 commit 9e35308
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ true/
*.parquet
example_data/*.csv
example_data/*.nc
example_data/*.parquet
*.mm_profdata

src/bin/*
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "peroxide"
version = "0.32.0"
version = "0.32.1"
authors = ["axect <axect@outlook.kr>"]
edition = "2018"
description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax"
Expand Down
6 changes: 6 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Release 0.32.1 (2022-11-04)

* Make an option for choosing compression method for parquet
* At `fuga` : `fn write_parquet(&self, path: &str, compression: CompressionOptions)`
* At `prelude` : `fn write_parquet(&self, path:&str)` (Default: `CompressionOptions::Uncompressed`)

# Release 0.32.0 (2022-11-03)

## DataFrame meets Parquet
Expand Down
44 changes: 43 additions & 1 deletion src/fuga/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! extern crate peroxide;
//! use peroxide::fuga::*;
//!
//! // Then you can use everyting in peroxide.
//! // Then you can use everything in peroxide.
//! ```
//!
//! # Compare with `prelude`
Expand Down Expand Up @@ -103,6 +103,48 @@
//! a.solve(&b).print(); // [1, 1]
//! }
//! ```
//!
//! * DataFrame with Parquet
//!
//! ```
//! extern crate peroxide;
//! use peroxide::fuga::*;
//!
//! fn main() {
//! let x = seq(0, 1, 0.1);
//! let y = x.fmap(|t| t.powi(2));
//!
//! let mut df = DataFrame::new(vec![]);
//! df.push("x", Series::new(x));
//! df.push("y", Series::new(y));
//!
//! df.print();
//!
//! # #[cfg(feature="parquet")] {
//! df.write_parquet("example_data/test.parquet", CompressionOptions::Uncompressed).unwrap();
//! # }
//! }
//! ```
//!
//! ```
//! extern crate peroxide;
//! use peroxide::prelude::*;
//!
//! fn main() {
//! let x = seq(0, 1, 0.1);
//! let y = x.fmap(|t| t.powi(2));
//!
//! let mut df = DataFrame::new(vec![]);
//! df.push("x", Series::new(x));
//! df.push("y", Series::new(y));
//!
//! df.print();
//!
//! # #[cfg(feature="parquet")] {
//! df.write_parquet("example_data/test.parquet").unwrap();
//! # }
//! }
//! ```

#[allow(unused_imports)]
pub use crate::macros::{julia_macro::*, matlab_macro::*, r_macro::*};
Expand Down
42 changes: 42 additions & 0 deletions src/prelude/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,48 @@
//! a.solve(&b).print(); // [1, 1]
//! }
//! ```
//!
//! * DataFrame with Parquet
//!
//! ```
//! extern crate peroxide;
//! use peroxide::fuga::*;
//!
//! fn main() {
//! let x = seq(0, 1, 0.1);
//! let y = x.fmap(|t| t.powi(2));
//!
//! let mut df = DataFrame::new(vec![]);
//! df.push("x", Series::new(x));
//! df.push("y", Series::new(y));
//!
//! df.print();
//!
//! # #[cfg(feature="parquet")] {
//! df.write_parquet("example_data/test.parquet", CompressionOptions::Uncompressed).unwrap();
//! # }
//! }
//! ```
//!
//! ```
//! extern crate peroxide;
//! use peroxide::prelude::*;
//!
//! fn main() {
//! let x = seq(0, 1, 0.1);
//! let y = x.fmap(|t| t.powi(2));
//!
//! let mut df = DataFrame::new(vec![]);
//! df.push("x", Series::new(x));
//! df.push("y", Series::new(y));
//!
//! df.print();
//!
//! # #[cfg(feature="parquet")] {
//! df.write_parquet("example_data/test.parquet").unwrap();
//! # }
//! }
//! ```

#[allow(unused_imports)]
pub use crate::macros::{julia_macro::*, matlab_macro::*, r_macro::*};
Expand Down
6 changes: 3 additions & 3 deletions src/prelude/simpler.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::error::Error;
use arrow2::io::parquet::write::CompressionOptions;
use crate::numerical::{
eigen,
eigen::{Eigen, EigenMethod::Jacobi},
Expand All @@ -8,12 +7,13 @@ use crate::numerical::{
spline,
spline::{CubicHermiteSpline, SlopeMethod::Quadratic},
};
use crate::prelude::DataFrame;
use crate::structure::matrix::{self, Matrix};
use crate::structure::polynomial;
use crate::traits::math::{Norm, Normed};
#[cfg(feature="parquet")]
use crate::structure::dataframe::WithParquet;
use crate::structure::dataframe::{DataFrame, WithParquet};
#[cfg(feature="parquet")]
use arrow2::io::parquet::write::CompressionOptions;

/// Simple Norm
pub trait SimpleNorm: Normed {
Expand Down

0 comments on commit 9e35308

Please sign in to comment.