coerce_numeric

glue.utils.array.coerce_numeric(arr)[source]

Coerce an array into a numeric array, replacing non-numeric elements with nans.

If the array is already a numeric type, it is returned unchanged

Parameters:

arr : numpy.ndarray

The array to coerce