-
Notifications
You must be signed in to change notification settings - Fork 0
Add matrix get support #1
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
base: master
Are you sure you want to change the base?
Conversation
An optional argument was added that provides the # of values from the json file for each row within the matrix. This allows the user to more easily know if not all of the rows had the same number of columns.
...I am by NO means saying this is elegant or the best way to have performed this... |
files/inputs/test36.json
Outdated
{ | ||
"fooList": [ | ||
[ | ||
[ 0.2,0.01,0.02,0.04], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you intentionally wrapping the matrix (array of arrays) in an additional outer array (with only one element, the matrix in question)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, nope! Looks like a copy error on my part. I'll fix this and test to see if that's the issue
files/inputs/test36.json
Outdated
[ 50.1,30.2], | ||
[ 50.1,30.2,0.01,0.02,0.04], | ||
[ 0.2,0.01,0.02], | ||
[ 0.2,0.01,0.02,0.04] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@porteri I have not looked into this in detail yet, however, my impression was that JSON-Fortran's extant matrix capabilities do not support sparse/ragged edge matrices. Is this a requirement for you? It will likely be easier to implement M by N matrices than ragged edge/sparse matrices in the JSON read & write routines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea unfortunately it is a requirement. That's why I added in the optional matrix_column_size
flag. It works fine reading b/c I allocate it to the largest size of N (currently hardwired to 1000 and then reduced but will fix this in future)
- Update with latest upstream enhancements 6.9.0 --> 6.10.0
Fixes the undefined variable error_cnt for test jacobwilliams#26 when the json%validate returns a true is_valid statement.
Fix for undefined variable in test#26
- MSVS will install, e.g., `$<prefix>/include/Debug/json_file_module.mod` - We should strip the build config directory that IDEs like MSVS add when doing an installation
…ran into add_matrix_support
1e13d34
to
ce9c43b
Compare
- Fixes jacobwilliams#413 - Use fixtures to delete old json outputs before re-running tests, then copy pristine inputs back into the build directory
…pointer fixed a dangling pointer in test 10. Fixes jacobwilliams#422
- Fixes jacobwilliams#413 - Also fixes regression testing and output validation
- Passing `-fcoarray=lib` to gfortran causes the compiler to generate different modules & symbols. This is likely a bug in gfortran, but, a consequence is that you need to build libraries you link to with the same `-fcoarray=...` flag.
Test fixtures 413
- Add additional optional, intent out parameter, `is_uniform` - `.true.` for regular matrices - `.false.` for ragged edge matrices - The idea is to allow trailing zeros to be compressed/elided (eventually) - The `set_size` dummy argument was renamed to `mx_set_size` and records the largest column size, assuming __*row* major order__
…efore json is removed from FAST
This adds support to
get
real data from 2d matrices and arrays of matrices.To use this
get
feature: