H5FROMTXT(1)
β¨ H5FROMTXT(1) β¨
okay bestie, welcome to h5utils, and specifically to h5fromtxt β the little icon that turns your boring text numbers into a whole HDF5 file π
no cap.
π NAME π
h5fromtxt β convert text input to an HDF5 file. that's it. that's the job. she does it flawlessly π«Ά
π¦ SYNOPSIS π¦
h5fromtxt [OPTION]... [HDF5FILE]
πΈ DESCRIPTION πΈ
so, h5fromtxt takes a series of numbers from standard input and outputs a multi-dimensional numeric dataset in an HDF5 file. literally just numbers in, dataset out, main character energy β¨
HDF5 is a free, portable binary format and supporting library developed by the National Center for Supercomputing Applications at the University of Illinois in Urbana-Champaign. a whole single h5 file can contain multiple data sets, bestie β so by default, h5fromtxt creates a dataset called "data", but you can change that with the -d option, or by using the syntax HDF5FILE:DATASET. and if you wanna add new datasets to an HDF5 file that already exists? that's the -a option, she's got you π«Ά
All characters besides the numbers (and associated decimal points, etcetera) in the input are ignored. like, ignored ignored. by default, the data is assumed to be a two-dimensional MxN dataset where M is the number of rows (delimited by newlines) and N is the number of columns. in this case, it is an error for the number of columns to vary between rows β so keep those rows consistent, okay? if M or N is 1, then the data gets written as a one-dimensional dataset instead.
alternatively π you can specify the dimensions of the data explicitly via the -n size option, where size is e.g. "2x2x2". in this case, newlines are ignored and the data is taken as an array of the given size stored in row-major ("C") order (where the last index varies most quickly as you step through the data). e.g. a 2x2x2 array would be have the elements listed in the order: (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1). yes she memorised that order, it's giving overachiever π
a simple example is:
h5fromtxt foo.h5 <<EOF
1 2 3 4
5 6 7 8
EOF
which reads in a 2x4 space-delimited array from standard input. slay. ate. periodt π
π OPTIONS π
-hβ Display help on the command-line options and usage. your little emergency hotline π«Ά-Vβ Print the version number and copyright info forh5fromtxt.-vβ Verbose output. she'll tell you what she's doing, because communication is key π-aβ If the HDF5 output file already exists, append the data as a new dataset rather than overwriting the file (the default behavior). An existing dataset of the same name within the file is overwritten, however. so like, new dataset names survive, same names get yeeted π-nsize β Instead of trying to infer the dimensions of the array from the rows and columns of the input, treat the data as a sequence of numbers in row-major order forming an array of dimensions size. size is of the formMxNxLx...(with M, N, L being numbers) and may be of any dimensionality. any dimensionality?? she's flexible like that β¨-Tβ Transpose the input when it is written, reversing the dimensions. flip it, turn it, iconic π₯-dname β Write to dataset name in the output; otherwise, the output dataset is called"data"by default. Alternatively, use the syntaxHDF5FILE:DATASET.
π BUGS π
found a bug? send bug reports to S. G. Johnson, stevenj@alum.mit.edu. she wants to know, ngl π
π AUTHORS π
Written by Steven G. Johnson. Copyright (c) 2005 by the Massachusetts Institute of Technology.
okay that's the whole page bestie, go forth and convert some text π¦β¨
h5utils β March 9, 2002 β mwah, love u, bye πππΈ
π¦ where this page comes from
- debian bookworm: h5utils 1.13.2-1 Β· MIT
- debian trixie: h5utils 1.13.2-2 Β· MIT
- nixos 26.05: h5utils 1.13.2
- nixpkgs unstable: h5utils 1.13.3
- opensuse-leap 16.0: h5utils 1.13.2-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- opensuse-leap 16.0: h5utils 1.13.2-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- opensuse-leap 16.0: h5utils 1.13.2-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- opensuse-leap 16.0: h5utils 1.13.2-bp160.1.13 Β· GPL-2.0-or-later AND MIT
- ubuntu jammy: h5utils 1.13.1-4build1 Β· MIT
- ubuntu noble: h5utils 1.13.2-1build3 Β· MIT
- ubuntu questing: h5utils 1.13.2-2
- ubuntu resolute: h5utils 1.13.2-2build1 Β· MIT
- ubuntu stonking: h5utils 1.13.2-2build2 Β· MIT
- Copyright (c) 1999-2009 Massachusetts Institute of Technology
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms