Table of Contents

Class ConverterError

Namespace
NumSharp
Assembly
NumSharp.dll

NumPy's numpy.lib._iotools.ConverterError (also numpy.lib.npyio.ConverterError): a string value that np.genfromtxt's column converter cannot convert (Converter #2 is locked and cannot be upgraded: (occurred line #4 for value 'abc')).

public class ConverterError : NumSharpException, ISerializable, INumSharpException
Inheritance
ConverterError
Implements
Derived
Inherited Members

Remarks

It derives from NumSharpException, as NumPy's derives from Python's Exception directly (it is NOT a ValueError, so catch (ValueError) misses it, as except ValueError does). Its subclass ConverterLockError reports a locked converter.

NumSharp does not raise it yet: it has no np.genfromtxt (and np.loadtxt, which it has, reports a bad value as NumPy's ValueError). The class exists so a port of code that raises or catches it compiles and behaves as in Python.

Constructors

ConverterError()

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

public ConverterError()

ConverterError(string)

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

public ConverterError(string message)

Parameters

message string

The text, verbatim.

ConverterError(string, Exception)

Creates the error with a message and the exception that caused it: Python's raise ConverterError(message) from innerException (NumPy's genfromtxt chains the converter's own failure this way).

public ConverterError(string message, Exception innerException)

Parameters

message string

The text, verbatim.

innerException Exception

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