A library for scientific computing in Crystal-Lang. Provides memory efficient data structures and powerful linear algebra routines backed by BLAS. Provides vectorized operations on one and two dimensional vectors and matrices. Currently in active development and not currently at all stable. Contributions are both welcomed and encouraged to bring powerful and fast data science to Crystal.
Add the dependency to your
dependencies: bottle: github: crystal-data/bottle
Bottle provides a Vector class that supports integer and float data types.
dv = Vector.new [1.0, 2, 3, 4, 5] # dtype is Float64 iv = Vector.new [1, 2, 3, 4, 5] # dtype is Int32 iv[1...] # slice of vector iv[[1, 2, 3]] # copy of vector, multi-indexing iv[[1, 2, 3]] = [6, 7, 8] # in place multiple assignment iv + iv # elementwise operations on vectors iv * iv iv / iv iv / 5 # elementwise operations using constants iv - 8 iv.dot(iv) # BLAS backed routines iv.norm
TODO: Write development instructions here
- Fork it (https://github.com/your-github-user/bottle/fork)
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
- Chris Zimmerman - creator and maintainer