Class SystemError
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
NumPy-compatible SystemError — Python's "the interpreter found an internal inconsistency" error. NumPy
raises it when an operation meets data that no Python object can represent, and NumSharp raises it in the same
places with CPython's verbatim text.
public class SystemError : NumSharpException, ISerializable, INumSharpException
- Inheritance
-
SystemError
- Implements
- Inherited Members
Remarks
The one place today: reading an element of a fixed-width Unicode (U) array whose UCS-4 unit is above
U+10FFFF (only reachable by viewing raw uint32 data as U). Python's str cannot hold
such a code point and NumPy's UNICODE_getitem fails inside PyUnicode_New with
invalid maximum character passed to PyUnicode_New; a .NET string cannot hold it either.
Copies and string↔string casts never decode, so they move such units unchanged, exactly as NumPy does.
It derives from NumSharpException (not from SystemException, which .NET reserves for runtime faults), like the other Python-named errors (RuntimeError, TypeError).
Constructors
SystemError(string)
Creates the error with CPython's message text.
public SystemError(string message)
Parameters
messagestringThe verbatim message (
invalid maximum character passed to PyUnicode_New).