Bench .bin format file IO class.
More...
Bench .bin format file IO class.
This class is little more than an elaborate wrapper for the numpy fromfile and tofile functions, but is included for completeness in the carputils.carpio
module.
◆ __init__()
def carputils.carpio.bin.BinFile.__init__ |
( |
|
self, |
|
|
|
filename, |
|
|
|
mode = 'r' |
|
) |
| |
- Parameters
-
filename | the filename to open |
mode | 'r' for read mode (default), 'w' for write mode |
◆ close()
def carputils.carpio.bin.BinFile.close |
( |
|
self | ) |
|
◆ data()
def carputils.carpio.bin.BinFile.data |
( |
|
self | ) |
|
- Returns
- numpy data array with the file contents
◆ write()
def carputils.carpio.bin.BinFile.write |
( |
|
self, |
|
|
|
data |
|
) |
| |
Write a numpy array to an IGB file.
- Parameters
-
data | The array to be written to the IGB file |
◆ DTYPE
carputils.carpio.bin.BinFile.DTYPE = np.dtype('<d') |
|
static |
The documentation for this class was generated from the following file: