Class NotImplementedError
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
Python's NotImplementedError: an operation declared for an input it is not implemented for, or an abstract
method a subclass did not override. NumSharp raises it where NumPy does, with NumPy's text: a masked array's
tofile, the numpy.ma functions limited to two dimensions (compress_rows, compress_cols,
compress_rowcols, mask_rowcols, notmasked_contiguous) and a seedless
SeedSequence's generate_state; a port throws it where its Python source raises it (a base class's
raise NotImplementedError).
public class NotImplementedError : RuntimeError, ISerializable, INumSharpException
- Inheritance
-
NotImplementedError
- Implements
- Inherited Members
Remarks
It derives from RuntimeError, as Python's does (NotImplementedError → RuntimeError →
Exception), so catch (RuntimeError) catches it as except RuntimeError does.
Footgun: it is NOT a .NET NotImplementedException, and a catch (NotImplementedException) does
not see it. NumSharp keeps .NET's NotImplementedException / NotSupportedException for
what NumSharp itself lacks, so the two never mean the same thing: this one is NumPy's (or the ported code's)
refusal.
Constructors
NotImplementedError()
Creates the error with Python's text for a bare raise NotImplementedError (the usual body of an abstract
method): an empty Message, as str(NotImplementedError()) is ''.
public NotImplementedError()
Remarks
ToString() then starts with the class name alone, as Python's traceback prints a
bare NotImplementedError.
NotImplementedError(string)
Creates the error with NumPy's (or the port's) message.
public NotImplementedError(string message)
Parameters
messagestringThe text, verbatim: Python's
str()of the error (MaskedArray.tofile() not implemented yet.).
NotImplementedError(string, Exception)
Creates the error with a message and the exception that caused it: Python's raise
NotImplementedError(message) from innerException, the cause kept in InnerException
as Python keeps it in cause.
public NotImplementedError(string message, Exception innerException)