Skip to content

Commit e5c3030

Browse files
Remove smart casting functions from docs and __all__
1 parent 427f31c commit e5c3030

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

docs/source/api/pytensorf.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ PyTensor utils
1515
cont_inputs
1616
floatX
1717
intX
18-
smartfloatX
19-
smarttypeX
2018
constant_fold
2119
CallableTensor
2220
join_nonshared_inputs

pymc/data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
import pymc as pm
3939

40-
from pymc.pytensorf import convert_data
40+
from pymc.pytensorf import convert_data, smarttypeX
4141
from pymc.vartypes import isgenerator
4242

4343
__all__ = [
@@ -99,7 +99,7 @@ def make_variable(self, gop, name=None):
9999
def __init__(self, generator):
100100
if not pm.vartypes.isgenerator(generator):
101101
raise TypeError("Object should be generator like")
102-
self.test_value = pm.smarttypeX(copy(next(generator)))
102+
self.test_value = smarttypeX(copy(next(generator)))
103103
# make pickling potentially possible
104104
self._yielded_test_value = False
105105
self.gen = generator
@@ -111,7 +111,7 @@ def __next__(self):
111111
self._yielded_test_value = True
112112
return self.test_value
113113
else:
114-
return pm.smarttypeX(copy(next(self.gen)))
114+
return smarttypeX(copy(next(self.gen)))
115115

116116
# python2 generator
117117
next = __next__

pymc/pytensorf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
"cont_inputs",
6868
"floatX",
6969
"intX",
70-
"smartfloatX",
71-
"smarttypeX",
7270
"jacobian",
7371
"CallableTensor",
7472
"join_nonshared_inputs",

tests/test_pytensorf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
replace_rng_nodes,
5151
replace_vars_in_graphs,
5252
reseed_rngs,
53+
smarttypeX,
5354
walk_model,
5455
)
5556
from pymc.vartypes import int_types
@@ -275,7 +276,7 @@ def test_convert_generator_data(input_dtype):
275276
# Evaluation results should have the correct* dtype!
276277
# (*intX/floatX will be enforced!)
277278
evaled = result.eval()
278-
expected_dtype = pm.smarttypeX(np.array(1, dtype=input_dtype)).dtype
279+
expected_dtype = smarttypeX(np.array(1, dtype=input_dtype)).dtype
279280
assert result.type.dtype == expected_dtype
280281
assert evaled.dtype == np.dtype(expected_dtype)
281282

0 commit comments

Comments
 (0)