2c76358bcdbd01b199c04893370c3b06e867cca9,descarteslabs/workflows/types/array/array_.py,Array,__init__,#Array#Any#,60

Before Change


                raise TypeError(
                    "Invalid dtype {} for an {}".format(arr.dtype, type(self).__name__)
                )
            if arr.ndim != self.ndim:
                raise ValueError(
                    "Cannot instantiate a {}-dimensional Workflows Array from a "
                    "{}-dimensional NumPy array".format(self.ndim, arr.ndim)
                )

            arr_list = arr.tolist()
            self.graft = client.apply_graft("array.create", arr_list)

        else:

After Change


            except Exception:
                raise ValueError("Cannot construct Array from {!r}".format(arr))

        if arr.dtype.kind not in ("b", "i", "f"):
            raise TypeError(
                "Invalid dtype {} for an {}".format(arr.dtype, type(self).__name__)
            )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: descarteslabs/descarteslabs-python
Commit Name: 2c76358bcdbd01b199c04893370c3b06e867cca9
Time: 2020-03-30
Author: 51922948+sdelany2@users.noreply.github.com
File Name: descarteslabs/workflows/types/array/array_.py
Class Name: Array
Method Name: __init__


Project Name: scikit-learn-contrib/DESlib
Commit Name: e8d6fd1a77df735a6362003014515d8249617011
Time: 2021-03-27
Author: rafaelmenelau@gmail.com
File Name: deslib/util/aggregation.py
Class Name:
Method Name: weighted_majority_voting_rule


Project Name: NervanaSystems/coach
Commit Name: 7ba1a4393ff563beceb420b1ed870e3e016140f6
Time: 2018-11-19
Author: thom.e.lane@gmail.com
File Name: rl_coach/architectures/mxnet_components/embedders/image_embedder.py
Class Name: ImageEmbedder
Method Name: hybrid_forward