mcsas.datafile.arrayfile module¶
-
class
ArrayFile(filename, **kwargs)[source]¶ Bases:
datafile.asciifile.AsciiFileA data file containing a single array of data, mostly.
-
classmethod
fileFilter()[source]¶ classmethod(function) -> method
Convert a function to be a class method.
A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:
- class C:
- def f(cls, arg1, arg2, …): … f = classmethod(f)
It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.
Class methods are different than C++ or Java static methods. If you want those, see the staticmethod builtin.
-
parseLines(asciiLines, **kwargs)[source]¶ Parses lines of an ASCII file in order to extract a single array of numbers. Reimplement this in subclasses for different behaviour.
-
rawArray¶
-
classmethod
-
classproperty(func)¶ Warning
function ‘datafile.arrayfile.classproperty’ undocumented
-
np_array(value)¶ Warning
function ‘datafile.arrayfile.np_array’ undocumented