mverzilli / crystalla Goto Github PK
View Code? Open in Web Editor NEWCrystal library for Numerical Methods. It binds to LAPACK and is unashamedly inspired by Numpy.
License: MIT License
Crystal library for Numerical Methods. It binds to LAPACK and is unashamedly inspired by Numpy.
License: MIT License
I'm experimenting with a new Ndarray class and while creating a class method add_element
, I took a look at how the add_rows
method was coded for the Matrix class, and I noticed that it wasn't modifying the object, but was returning a new one.
Instinctively, I would expect that I could do:
matrix = Crystalla::Matrix.new([1.0, 2.0, 2.0, 3.0], 2, 2)
p matrix
>> Matrix[[ 1.0, 2.0 ],
[ 2.0, 3.0 ]]
matrix.add_rows(1, Crystalla::Matrix.new([4.5, 3.0], 1,2))
p matrix
>> Matrix[[ 1.0, 2.0 ],
[ 4.5, 3.0 ],
[ 2.0, 3.0 ]]
Instead, I need to assign it to a new instance to get the modified matrix:
matrix2 = matrix.add_rows(1, Crystalla::Matrix.new([4.5, 3.0], 1,2))
Is there a particular reason why you made this choice ?
For Ndarrays, it would seem more natural to do:
array = Crystalla::Ndarray.new([1.0, 2.0, 2.0, 3.0])
array.add_element(6.0, 1)
p array
>> Ndarray [1.0, 6.0, 2.0, 2.0, 3.0]
Let me know what you think !
Hi, I have started to play with Crystal. For now, I'm trying to migrate some scripts I had in ruby with some algorithms implementations (about all ML algorithms). I could migrate some matrices using this library, but I couldn't find support for Vector class in Crystal and neither crystalla.
http://ruby-doc.org/stdlib-2.2.1/libdoc/matrix/rdoc/Vector.html
Can you help me? I am willing to contribute with these kind of libraries when I have enough knowledge and experience with Crystal , I think it has an enormous potential for Data Science, and I eventually want to use it in some real data oriented projects ๐
The .npy file format has become standard to serialize arrays, so I think crystalla could really use it. It will open up possibility of interoperability with other systems such as tensorflow/python. WDYT?
Hi !
I'm trying to require crystalla in a small script but it crashes at the require.
Error in eig.cr:1: while requiring "crystalla"
require "crystalla"
^
in lib/crystalla/src/crystalla.cr:1: while requiring "./crystalla/*"
require "./crystalla/*"
^
Syntax error in lib/crystalla/src/crystalla/lib_blas.cr:4: expecting identifier 'end', not 'else'
else
^
Since there isn't a lot of users yet, it's hard to find answers elsewhere. Is this a common issue ?
My shard.yml:
dependencies:
crystalla:
github: mverzilli/crystalla
Any idea ?
Thanks a lot
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.