e086b02bf4d19fbdcc751bfa876d03f2fcdaf375,tf_encrypted/tensor/int100.py,Int100Factory,tensor,#Int100Factory#Any#,97

Before Change



        if isinstance(value, tf.Tensor):
            if value.dtype is not self.native_type:
                value = tf.cast(value, dtype=self.native_type)
            return Int100Tensor(_crt_decompose(value))

        if isinstance(value, np.ndarray):
            return Int100Tensor(_crt_decompose(value))

After Change


            return Int100Tensor(backing)

        if isinstance(value, np.ndarray):
            backing = [
                tf.convert_to_tensor(v, dtype=INT_TYPE)
                for v in _crt_decompose(value)
            ]
            return Int100Tensor(backing)

        raise TypeError("Don"t know how to handle {}", type(value))

    def seeded_tensor(self, shape, seed):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: mortendahl/tf-encrypted
Commit Name: e086b02bf4d19fbdcc751bfa876d03f2fcdaf375
Time: 2019-01-10
Author: mortendahlcs@gmail.com
File Name: tf_encrypted/tensor/int100.py
Class Name: Int100Factory
Method Name: tensor


Project Name: quantumlib/Cirq
Commit Name: baddb11a55a68c29cdc319bc9dde6e0a24ad32fe
Time: 2020-12-08
Author: dabacon@gmail.com
File Name: cirq/ionq/serializer.py
Class Name: Serializer
Method Name: serialize


Project Name: GPflow/GPflow
Commit Name: bd1e9c04b48dd5ccca9619d5eaa2595a358bdb08
Time: 2020-01-31
Author: st--@users.noreply.github.com
File Name: gpflow/kernels/misc.py
Class Name: ArcCosine
Method Name: K_diag