-
Notifications
You must be signed in to change notification settings - Fork 174
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
loadtxt and savetxt #16
Comments
I think these are great functions to start with and figure out the workflow. Good to go ahead as far as I'm concerened. What module would this belong to? |
I think we agreed to prefix modules with The There is also So |
@certik Nice examples. I think it could be easily combine with something like
Float, double-precision,integer,... could be then supported. |
@jvdp1 Indeed, plain |
This also includes a minimal CMake build system. We can improve the build system in further PRs. Fixes fortran-lang#16.
I sent a PR in #23. |
We can also get some inspiration from this csv read/write one of mine: https://github.com/jacobwilliams/fortran-csv-module |
@jacobwilliams good point, I created a standalone issue #24 for CSV. You are right that it is related, as in NumPy one can use genfromtxt to read CSV. |
Very nice start. What do you think of adding some optional functionalities like the following?
I found very useful (actually necessary) both them but I don't know how much general interest there is. |
@epagone, yes, we can add the All these arguments go after the Can you elaborate on the |
This also includes a minimal CMake build system. We can improve the build system in further PRs. Fixes fortran-lang#16.
Implementation: https://github.com/certik/fortran-utils/blob/b43bd24cd421509a5bc6d3b9c3eeae8ce856ed88/src/utils.f90#L176
The interface is compatible with NumPy (e.g., you can do
savetxt
from Fortran and doloadtxt
from NumPy and it just works, and vice versa).The
loadtxt
has the argument asallocatable, intent(out)
, because you typically do not know the size of the matrix ahead of time.NumPy: savetxt, loadtxt
The text was updated successfully, but these errors were encountered: