7ad4f4ec7370a58996f90b8edec4c4eec88c0c9c,geomstats/vectorization.py,,get_n_points,#Any#Any#,20

Before Change


        Number of points.
    
    n_points = 1
    if point_type == "scalar" and gs.ndim(points) == 1:
        n_points = gs.shape(points)[0]
    if point_type == "vector" and gs.ndim(points) == 2:
        n_points = gs.shape(points)[0]
    if point_type == "matrix" and gs.ndim(points) == 3:
        n_points = gs.shape(points)[0]
    return n_points

After Change


    
    n_points = 1

    points_ndim = gs.ndim(points)

    is_vect_scalar = (point_type == "scalar" and points_ndim == 1)
    is_vect_vector = (point_type == "vector" and points_ndim == 2)
    is_vect_matrix = (point_type == "matrix" and points_ndim == 3)

    if is_vect_scalar or is_vect_vector or is_vect_matrix:
        n_points = gs.shape(points)[0]
    return n_points
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 33

Instances


Project Name: geomstats/geomstats
Commit Name: 7ad4f4ec7370a58996f90b8edec4c4eec88c0c9c
Time: 2020-04-17
Author: ninamio78@gmail.com
File Name: geomstats/vectorization.py
Class Name:
Method Name: get_n_points


Project Name: geomstats/geomstats
Commit Name: 7ad4f4ec7370a58996f90b8edec4c4eec88c0c9c
Time: 2020-04-17
Author: ninamio78@gmail.com
File Name: geomstats/vectorization.py
Class Name:
Method Name: get_n_points


Project Name: geomstats/geomstats
Commit Name: 81a38de3eaedeb1a05684c34decd4607df03e01c
Time: 2020-04-17
Author: ninamio78@gmail.com
File Name: geomstats/vectorization.py
Class Name:
Method Name: get_n_points


Project Name: geomstats/geomstats
Commit Name: 7915616cb1652f24ac5415383f6604273fe43317
Time: 2020-04-17
Author: ninamio78@gmail.com
File Name: geomstats/vectorization.py
Class Name:
Method Name: get_n_points