MCPcopy Index your code
hub / github.com/pymc-devs/pymc / floatX

Function floatX

pymc/pytensorf.py:264–270  ·  view source on GitHub ↗

Convert a PyTensor tensor or numpy array to pytensor.config.floatX type.

(X)

Source from the content-addressed store, hash-verified

262
263
264def floatX(X):
265 """Convert a PyTensor tensor or numpy array to pytensor.config.floatX type."""
266 try:
267 return X.astype(pytensor.config.floatX)
268 except AttributeError:
269 # Scalar passed
270 return np.asarray(X, dtype=pytensor.config.floatX)
271
272
273_conversion_map = {"float64": "int32", "float32": "int16", "float16": "int8", "float8": "int8"}

Callers 15

__init__Method · 0.90
continuous_random_testerFunction · 0.90
logitFunction · 0.90
__call__Method · 0.90
distMethod · 0.90
astepMethod · 0.90
astepMethod · 0.90
astepMethod · 0.90
__init__Method · 0.90
resetMethod · 0.90
randomMethod · 0.90

Calls

no outgoing calls

Tested by 15

__init__Method · 0.72
continuous_random_testerFunction · 0.72
__call__Method · 0.72
setup_classMethod · 0.72
test_symbolic_coordsMethod · 0.72
integersFunction · 0.72
test_abortFunction · 0.72
test_explicit_sampleFunction · 0.72
test_iteratorFunction · 0.72