Skip to content

Weird resizing issue with element_prod #31

@mortonjt

Description

@mortonjt

I've noticed unexpected resizing when I'm doing element wise multiplication
When I run the following code

import pyviennacl as pv
import numpy as np
a = pv.Matrix(np.array([ [1,2,3], [4,5,6] ], dtype=np.float32))
a.element_prod(a)

This is the output

array([[  1.,   4.,   9.],
       [ 16.,  25.,  36.],
       [  0.,   0.,   0.]], dtype=float32)

The workaround I'm going to use for now is to subset the result matrix. However, from previous experience, I know that this subsetting operation is costly

Note: I am running into this issue with the pip installable version. Has this been fixed in a more recent update? If not, is there are preferred work around solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions