6870c69273935836184b0981a9be09ed784f9367,qiskit/aqua/operators/primitive_ops/matrix_op.py,MatrixOp,__init__,#MatrixOp#Any#Any#,42
Before Change
primitive = Operator(primitive)
if not isinstance(primitive, Operator):
raise TypeError(
"MatrixOp can only be instantiated with MatrixOperator, "
"not {}".format(type(primitive)))
if not primitive.input_dims() == primitive.output_dims():
raise ValueError("Cannot handle non-square matrices yet.")
After Change
primitive = Operator(primitive)
if not isinstance(primitive, Operator):
type_hints = get_type_hints(MatrixOp.__init__).get("primitive")
valid_cls = [cls.__name__ for cls in type_hints.__args__]
raise TypeError(f"MatrixOp can only be instantiated with {valid_cls}, "
f"not "{primitive_orig.__class__.__name__}"")
if not primitive.input_dims() == primitive.output_dims():
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
Instances
Project Name: Qiskit/qiskit-aqua
Commit Name: 6870c69273935836184b0981a9be09ed784f9367
Time: 2020-10-22
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/primitive_ops/matrix_op.py
Class Name: MatrixOp
Method Name: __init__
Project Name: keras-team/keras-preprocessing
Commit Name: f5144e5979f1464df12dc85d9b67ea44f43b9193
Time: 2019-03-12
Author: rragundez@users.noreply.github.com
File Name: keras_preprocessing/image/dataframe_iterator.py
Class Name: DataFrameIterator
Method Name: __init__
Project Name: biocore/scikit-bio
Commit Name: 67d8d5f9309b13b6dc4d1a864bd4f768cffc27a4
Time: 2014-09-12
Author: jai.rideout@gmail.com
File Name: skbio/sequence/_sequence.py
Class Name: BiologicalSequence
Method Name: __getitem__
Project Name: descarteslabs/descarteslabs-python
Commit Name: 5f8efbea5f23a9ee14f5dcb3d84b12ecf5ef1403
Time: 2019-08-22
Author: gabe@descarteslabs.com
File Name: descarteslabs/workflows/types/core/promote.py
Class Name:
Method Name: _promote