You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, probably it is best to add a function line numpy.loadtxt_with_comments (name can change), that with return the comments (Header and Footer are considered comments) too, so you don't lose them.
For removing header and footer while loading a file, numpy.genfromtxt can be used instead which provides handling of the comments as well. It isn't fast enough though compared to numpy.loadtxt. For using numpy.loadtxt, skipping header is as straightforward as setting the argument skiprows as the number of lines in header. Handling footers in numpy.loadtxt could be a challenge though.
Proposed new feature or change:
numpy.savetxt
hasheader
andfooter
as parameters. It would be nice to have a reverse functionality while loading the file usingnumpy.loadtxt
.The text was updated successfully, but these errors were encountered: