Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird resizing issue with element_prod #31

Open
mortonjt opened this issue Jan 12, 2015 · 4 comments
Open

Weird resizing issue with element_prod #31

mortonjt opened this issue Jan 12, 2015 · 4 comments

Comments

@mortonjt
Copy link

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?

@tsmithe
Copy link
Collaborator

tsmithe commented Jan 12, 2015

Ah, yes, that does look like a bug. I'll make sure it is fixed in the git repo.

I have been saying this for a while, but I really do intend to get a new release out soon. I've had to do a lot of travelling over the last few weeks, but once I settle down again, the new release is my top priority (after my day job..).

@tsmithe
Copy link
Collaborator

tsmithe commented Jan 12, 2015

As for an easy workaround, I will try and think of one at the same time as investigating the status of this in git master in the next couple of days.

@robclouth
Copy link

robclouth commented Sep 25, 2016

Hey, same issue. Any updates on this? I'm using the pip install version.

@karlrupp
Copy link
Collaborator

@tsmithe Any chance you can have a look at this? It's probably easy for you to fix. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants