Table of Contents

Class IndexError

Namespace
NumSharp
Assembly
NumSharp.dll

Exception that corresponds to Python/NumPy's IndexError. Raised when a sequence subscript is out of range, or when an index type is invalid (e.g. float/complex index on an ndarray).

public class IndexError : NumSharpException, ISerializable, INumSharpException
Inheritance
IndexError
Implements
Inherited Members

Constructors

IndexError()

Creates the error with Python's text for a bare raise IndexError: an empty Message, as str(IndexError()) is ''.

public IndexError()

Remarks

ToString() then starts with the class name alone, as Python's traceback prints a bare IndexError; prefer a message that names the index and the bound.

IndexError(string)

Creates the error with NumPy's (or the port's) message.

public IndexError(string message)

Parameters

message string

The text, verbatim: Python's str() of the error.

IndexError(string, Exception)

Creates the error with a message and the exception that caused it: Python's raise IndexError(message) from innerException, the cause kept in InnerException as Python keeps it in cause.

public IndexError(string message, Exception innerException)

Parameters

message string

The text, verbatim: Python's str() of the error.

innerException Exception

The exception that led to this one, or null for none.