read_funct_1dread_funct_1dReadFunct1dReadFunct1dread_funct_1d (Operator)
Name
read_funct_1dread_funct_1dReadFunct1dReadFunct1dread_funct_1d
— Read a function from a file.
Signature
def read_funct_1d(file_name: str) -> Sequence[Union[float, int]]
def read_funct_1d_s(file_name: str) -> Union[float, int]
Description
The operator read_funct_1dread_funct_1dReadFunct1dReadFunct1dReadFunct1dread_funct_1d
reads the contents of
FileNameFileNameFileNameFileNamefileNamefile_name
and converts it into the function
FunctionFunctionFunctionFunctionfunctionfunction
. The file has be generated by
write_funct_1dwrite_funct_1dWriteFunct1dWriteFunct1dWriteFunct1dwrite_funct_1d
.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
FileNameFileNameFileNameFileNamefileNamefile_name
(input_control) filename.read →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of the file to be read.
FunctionFunctionFunctionFunctionfunctionfunction
(output_control) function_1d →
HFunction1D, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Function from the file.
Result
If the parameters are correct the operator read_funct_1dread_funct_1dReadFunct1dReadFunct1dReadFunct1dread_funct_1d
returns the value 2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
Alternatives
fread_stringfread_stringFreadStringFreadStringFreadStringfread_string
,
read_tupleread_tupleReadTupleReadTupleReadTupleread_tuple
See also
write_funct_1dwrite_funct_1dWriteFunct1dWriteFunct1dWriteFunct1dwrite_funct_1d
,
write_imagewrite_imageWriteImageWriteImageWriteImagewrite_image
,
write_regionwrite_regionWriteRegionWriteRegionWriteRegionwrite_region
,
open_fileopen_fileOpenFileOpenFileOpenFileopen_file
Module
Foundation