Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrices #156

Open
jacobwilliams opened this issue Oct 6, 2015 · 5 comments
Open

Matrices #156

jacobwilliams opened this issue Oct 6, 2015 · 5 comments

Comments

@jacobwilliams
Copy link
Owner

Add get routines for getting matrices (integer, real, etc.) from json files and objects. This could be used, for example, to easily get a variable like:

{
    "matrix": [
        [1,2,3,4],
        [1,2,3,4],
        [1,2,3,4]
    ]
}

Could also have optional inputs to indicate if the matrix is stored in column-major (Fortran-style) or row-major (C-style) order.

Would also have to check to make sure each row has the same number of columns and are all the same variable type.

Also add the corresponding set routines.

@jacobwilliams
Copy link
Owner Author

See: #212. Added a matrix_info routine to check if a variable is a valid matrix.

@derdrdirk
Copy link

A corresponding set routine would be a huge plus 👍

@porteri
Copy link

porteri commented Aug 14, 2018

Just checking to see if this was a dead feature request or not. The matrix_info routine works fine to check to see if a matrix exists and gets some sizes but really would love to have some get routines to read in something like this:

    "fooList":
    [
        [
            [ 0.2,0.01,0.02,0.04],
            [ 50.1,30.2,0.01,0.02,0.04],
            [ 50.1,30.2,0.01,0.02,0.04],
            [ 0.2,0.01,0.02,0.04]
        ],
        [
            [ 0.2,0.01,0.02,0.04],
            [ 50.1,30.2,0.01,0.02,0.04],
            [ 50.1,30.2,0.01,0.02,0.04],
            [ 0.2,0.01,0.02,0.04]
        ],
    ],

@jacobwilliams
Copy link
Owner Author

It's not dead... I'm just not looking forward to having to add all the wrapper for all the different variable types. :) I'll try to get to it when I can.

@jacobwilliams
Copy link
Owner Author

See: #426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants