Class TooHardError
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
Exception that corresponds to NumPy's numpy.exceptions.TooHardError — raised by
shares_memory(NDArray, NDArray, long) when the bounded memory-overlap search
exhausts its max_work candidate budget before it can decide the question exactly.
public class TooHardError : RuntimeError, ISerializable, INumSharpException
- Inheritance
-
TooHardError
- Implements
- Inherited Members
Remarks
Derives from RuntimeError so that callers written against NumPy's hierarchy —
where TooHardError subclasses RuntimeError — keep catching it with a
catch (RuntimeError). It signals "undecided within the work cap", NOT "the arrays
overlap": assigning a finite max_work is what turns an otherwise-answerable query
into this failure. may_share_memory(NDArray, NDArray, long) never throws it —
it treats the undecided outcome as a conservative true instead.
Constructors
TooHardError()
Creates a TooHardError with Python's text for a bare raise TooHardError: an empty
Message, as str(np.exceptions.TooHardError()) is ''.
public TooHardError()
Remarks
NumSharp's own raise site passes NumPy's text, "Exceeded max_work".
TooHardError(string)
Creates a TooHardError with a specific message.
public TooHardError(string message)
Parameters
messagestringThe message that describes the error (NumPy uses "Exceeded max_work").
TooHardError(string, Exception)
Creates a TooHardError with a message and the exception that caused it: Python's raise
TooHardError(message) from innerException, the cause kept in InnerException.
public TooHardError(string message, Exception innerException)