GithubHelp home page GithubHelp logo

matrix's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

matrix's Issues

Should matrices support column-major order?

Currently, matrices are row-major order. Supporting column-major order would require internal modifications to provide efficient access patterns.

  • What are the use cases for supporting column-major order as an option?
  • API implications?
    • Would probably require modifying the API from being variadic to being an object-based interface.
  • How different from creating a Matrix and then just taking the transpose?

Assignment of `NaN`

When using the non-raw implementation of the matrix module, it is not possible right now to assign the value NaN to a float32 or float64 matrix, even though the underlying typed arrays could naturally hold this value. This has been a problem for me in a couple of modules, as it conflicts with our standard of failing silently when a computation is not possible for the given input types. Your thoughts?

toJSON should deep copy

Currently, shape and strides are shallow copied. This is leaky and may lead to bugs due to (unintended) mutations.

The following modules should be used:

  1. dstructs-cast-arrays to cast the internal typed array to a generic array
  2. utils-copy to copy shape and strides

Row and Column Names

What are your thoughts on allowing for row and column names? R has this feature, and for standard applications in statistics, where the columns of a design matrix hold data for different predictors, this helps immensely. It allows oneself to index via the column and row names, for example.
Could we support something similar?

Here is an example:

mat = matrix( c( 40, 29, 55, 5000, 3900, 5500 ), nrow = 3, ncol = 2 )
colnames( mat ) = c(  "Age", "Income" )

Printing the matrix then gives the following:

    Age Income
[1,]  40   5000
[2,]  29   3900
[3,]  55   5500

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.