Error fixed - modify write test
@@ -437,7 +437,7 @@ impl Matrix {
/// use peroxide::*;
///
/// let a = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
- /// a.write("test.csv", 0);
+ /// a.write("test.csv");
/// ```
pub fn write(&self, file_path: &str) -> Result<(), Box<Error>> {
let mut wtr = WriterBuilder::new().from_path(file_path)?;
@@ -454,6 +454,16 @@ impl Matrix {
Ok(())
}
+ /// Write to CSV (with round option)
+ ///
+ /// # Examples
+ /// ```
+ /// extern crate peroxide;
+ /// use peroxide::*;
+ ///
+ /// let a = matrix(c!(1,2,3,3,2,1), 3, 2, Col);
+ /// a.write("test.csv", 0);
+ /// ```
pub fn write_round(&self, file_path: &str, round: usize) -> Result<(), Box<Error>> {
let mut wtr = WriterBuilder::new().from_path(file_path)?;
let r = self.row;
