You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / testing / _private / utils / temppath

function

numpy.testing._private.utils:temppath

source: /numpy/testing/_private/utils.py :2192

Signature

def   temppath ( * args ** kwargs )

Summary

Context manager for temporary files.

Extended Summary

Context manager that returns the path to a closed temporary file. Its parameters are the same as for tempfile.mkstemp and are passed directly to that function. The underlying file is removed when the context is exited, so it should be closed at that time.

Windows does not allow a temporary file to be opened if it is already open, so the underlying file must be closed after opening before it can be opened again.

Aliases

  • numpy.testing.temppath