Table of Contents

Class UnicodeEncodeError

Namespace
NumSharp
Assembly
NumSharp.dll

NumPy-compatible UnicodeEncodeError: a Unicode string held a character the target encoding cannot represent. NumSharp raises it where NumPy's ASCII codec does — a U value with a code point at or above 128 stored into an S (byte-string) array, cast to S, or given to np.array(…, dtype='S').

public class UnicodeEncodeError : UnicodeError, ISerializable, INumSharpException
Inheritance
UnicodeEncodeError
Implements
Inherited Members

Remarks

The message follows CPython's UnicodeEncodeError.str exactly: one offending character reads 'ascii' codec can't encode character '\xe9' in position 1: ordinal not in range(128) (the character as \xNN, \uNNNN or \UNNNNNNNN), a run of consecutive offending characters reads 'ascii' codec can't encode characters in position 1-2: ordinal not in range(128). Positions count code points of the element, not UTF-16 units, as Python does.

Constructors

UnicodeEncodeError(string)

Creates the error with CPython's message text.

public UnicodeEncodeError(string message)

Parameters

message string

The verbatim message.