Class OSError
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
NumPy-compatible OSError: an operating-system level file operation NumPy refuses or that fails. NumPy raises
it from ndarray.tofile (cannot write object arrays to a file in binary mode for a
StringDType array, whose 16-byte cells point into an allocator a file cannot hold) and from its file
writes (problem writing element 3 to file), and NumSharp raises it in the same places with NumPy's
verbatim text.
public class OSError : IOException, ISerializable, INumSharpException
- Inheritance
-
OSError
- Implements
- Inherited Members
Remarks
Unlike the other Python-named errors (TypeError, SystemError, which derive from
NumSharpException), it derives from IOException: Python's OSError IS the I/O
error class (IOError is its alias), so a .NET caller that catches IOException around a file
operation catches this refusal too — the same reason ValueError derives from
ArgumentException.
Plain .NET I/O failures (a missing file, a full disk) keep their own .NET exception types; this class carries only the errors NumPy itself raises with its own text.
Constructors
OSError(string)
Creates the error with NumPy's message text.
public OSError(string message)
Parameters
messagestringThe verbatim message (
cannot write object arrays to a file in binary mode).
OSError(string, Exception)
Creates the error with NumPy's message text and the exception that caused it.
public OSError(string message, Exception innerException)