7549828b0884bf082869ee22d63c0622264a7ee1,thinc/check.py,,has_shape,#Any#Any#Any#Any#,23

Before Change


    shape may contain string attributes, which will be fetched from arg0 to
    the function (usually self).
    """
    print("has shape?", args)
    self = args[0]
    arg = args[arg_id]
    if not hasattr(arg, "shape"):
        raise ExpectedTypeError(arg, ["array"])

After Change


            dim = getattr(self, dim, None)
        shape_values.append(dim)
    if len(shape) != len(arg.shape):
        raise ShapeMismatchError(arg.shape, tuple(shape_values), shape)
    for i, dim in enumerate(shape_values):
        // Allow underspecified dimensions
        if dim is not None and arg.shape[i] != dim:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: explosion/thinc
Commit Name: 7549828b0884bf082869ee22d63c0622264a7ee1
Time: 2017-01-16
Author: honnibal+gh@gmail.com
File Name: thinc/check.py
Class Name:
Method Name: has_shape


Project Name: lmcinnes/pynndescent
Commit Name: c91e5ef0b58c1c61442352b4a42bfc46b0800650
Time: 2019-10-08
Author: leland.mcinnes@gmail.com
File Name: pynndescent/rp_trees.py
Class Name:
Method Name: make_forest


Project Name: KaiyangZhou/deep-person-reid
Commit Name: af41e231a6d1991ed7ab8197effdd098a9fb3de8
Time: 2018-05-02
Author: k.zhou@qmul.ac.uk
File Name: data_manager.py
Class Name: DukeMTMCVidReID
Method Name: _process_dir