Skip to content

jlapeyre/zchop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zchop

This is a python library providing the function zchop, which replaces numbers that are close to zero with zero.

  • zchop traverses structures such as lists and numpy arrays, returning a copy that is the same as the input except that small numbers are set to zero.
  • zchop_mut is a mutating version of zchop that mutates lists and numpy arrays.

Comments

  • The parts of complex numbers are treated separately.
  • Non-numbers are passed unchanged.

Antecedents

This package is based on the Julia package ZChop.jl, which is in turn based on the Mathematica function Chop.

About

Replace small numbers with zero in python lists and arrays

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages