This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / lib / _iotools / StringConverter / upgrade_mapper

classmethod

numpy.lib._iotools:StringConverter.upgrade_mapper

source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_iotools.py :544

Summary

Upgrade the mapper of a StringConverter by adding a new function and its corresponding default.

Extended Summary

The input function (or sequence of functions) and its associated default value (if any) is inserted in penultimate position of the mapper. The corresponding type is estimated from the dtype of the default value.

Parameters

func : var

Function, or sequence of functions

Examples

import dateutil.parser
import datetime
dateparser = dateutil.parser.parse
defaultdate = datetime.date(2000, 1, 1)
StringConverter.upgrade_mapper(dateparser, default=defaultdate)

Aliases

  • numpy.lib._iotools.StringConverter.upgrade_mapper