Table of Contents

Class LookupError

Namespace
NumSharp
Assembly
NumSharp.dll

NumPy-compatible LookupError: a name that a registry does not know. NumSharp raises it where Python's codec registry does — an encoding name np.savetxt / np.loadtxt cannot resolve (unknown encoding: bytes: np.savetxt has no special 'bytes' encoding, unlike np.loadtxt).

public class LookupError : ArgumentException, ISerializable, INumSharpException
Inheritance
LookupError
Implements
Inherited Members

Remarks

Python's LookupError is the base of KeyError and IndexError; NumSharp's KeyError and IndexError keep their own bases (changing them would break existing catch sites), so this class carries only the codec lookup. It derives from ArgumentException: the unknown name is an argument, and a .NET caller that catches ArgumentException around an encoding choice keeps working.

Constructors

LookupError(string)

Creates the error with Python's message text.

public LookupError(string message)

Parameters

message string

The verbatim message (unknown encoding: bytes).

LookupError(string, Exception)

Creates the error with Python's message text and the exception that caused it.

public LookupError(string message, Exception innerException)

Parameters

message string

The verbatim message.

innerException Exception

The .NET exception behind the failed lookup.