bdd3dc0a47c80609b6a273e602a2b76992c83d5a,pymc3/distributions/distribution.py,,to_tuple,#Any#,421
Before Change
def to_tuple(shape):
Convert ints, arrays, and Nones to tuples
try:
shape = tuple(shape or ())
except TypeError: // If size is an int
shape = tuple((shape,))
except ValueError: // If size is np.array
shape = tuple(shape)
return shape
def _is_one_d(dist_shape):
if hasattr(dist_shape, "dshape") and dist_shape.dshape in ((), (0,), (1,)):
After Change
def to_tuple(shape):
Convert ints, arrays, and Nones to tuples
if shape is None:
return tuple()
return tuple(np.atleast_1d(shape))
def _is_one_d(dist_shape):
if hasattr(dist_shape, "dshape") and dist_shape.dshape in ((), (0,), (1,)):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: pymc-devs/pymc3
Commit Name: bdd3dc0a47c80609b6a273e602a2b76992c83d5a
Time: 2018-09-26
Author: ColCarroll@users.noreply.github.com
File Name: pymc3/distributions/distribution.py
Class Name:
Method Name: to_tuple
Project Name: descarteslabs/descarteslabs-python
Commit Name: b17e18b4224450aeb24e61d5545016dfe3f1b81a
Time: 2021-01-05
Author: gabe@descarteslabs.com
File Name: descarteslabs/workflows/execution/arguments.py
Class Name:
Method Name: arguments_to_grafts
Project Name: tensorlayer/tensorlayer
Commit Name: ab50820c352bef9a551ec6349ad73397c1529cf5
Time: 2019-01-15
Author: dhsig552@163.com
File Name: tensorlayer/layers/dense/binary_dense.py
Class Name: BinaryDense
Method Name: build