c18ea010c0f43c5144f1c5265874709f68c2e1f3,lazyflow/utility/blockwise_view.py,,blockwise_view,#Any#Any#Any#,3

Before Change


    view_10d = blockwise_view_5d( a_5d, blockshape_5d )
    
    // Drop the extra dimensions
    slicing_5d = (0,)*padded_dims + (slice(None),)*a.ndim
    slicing_10d = slicing_5d + slicing_5d
    
    view = view_10d[slicing_10d]

After Change


    intra_block_strides *= a.itemsize
    inter_block_strides *= a.itemsize

    strides = tuple(inter_block_strides) + tuple(intra_block_strides)

    // This is where the magic happens.
    // Generate a view with our new strides.
    return numpy.lib.stride_tricks.as_strided(a, shape=view_shape, strides=strides)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ilastik/ilastik
Commit Name: c18ea010c0f43c5144f1c5265874709f68c2e1f3
Time: 2015-01-28
Author: bergs@janelia.hhmi.org
File Name: lazyflow/utility/blockwise_view.py
Class Name:
Method Name: blockwise_view


Project Name: dask/dask-image
Commit Name: 783c109c591c6a3affc750d29c9d56f86c1ed6cb
Time: 2018-09-29
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/_utils.py
Class Name:
Method Name: _ravel_shape_indices


Project Name: luispedro/mahotas
Commit Name: 48fd85aa56d30159279804e253978918a81a5ab4
Time: 2015-06-03
Author: luis@luispedro.org
File Name: mahotas/bbox.py
Class Name:
Method Name: bbox