Hey all,

So I've fixed all the below stuff (but I've not yet uploaded a new
package to the PPA). I just want a small piece of advice (below).

Karl Rupp <r...@iue.tuwien.ac.at> writes:
>>> * Okay, so let's try to print individual elements of A and B:
>>>    A(1,1);        # error!
>>>    A.item(1,1);   # error!
>>>    A[1,1];        # returns pyviennacl.pycore.HostScalar information
>>>    print(A[1,1]); # works!
>>> Okay, this was a bit lengthy, we should have some more 'newbie
>>> information' in the docs :-)
>>
>> Hmm.. I think I might set it so that doing 'A[1,1]' at the interpreter
>> prompt prints the object, rather than the class info; but see below for
>> more about this. Also be aware that PyViennaCL supports ranges and
>> slices :)
>
> numpy also just prints the element value, so that would be consistent if 
> it's technically feasible without interfering with the underlying 
> expression tree...

Done!

>>> Okay, let's stop here for now. Summary: Great, simple operations just
>>> work nicely and it integrates well in the Python environment. What can
>>> be done to make the user experience even better?
>>>    - Allow element-wise manipulation. Sure, this is terribly slow, but it
>>> helps a lot with prototyping, which is an important use case with
>>> Python.
>>
>> Mrrgh. OK :)
>
> :-) How tricky is this to implement? ViennaCL uses an entry_proxy object 
> for this.

Done!

>
>>>    - Provide a few 'first steps' tutorials with the documentation. If
>>> that's already there and I simply couldn't find it, make it more
>>> visible. This way more emphasis is on the 'get simple stuff going'
>>> rather than internals of the scheduler which people won't read through
>>> for a start.
>>
>> Yes, I should probably do this. In large part, I was relying on people
>> knowing NumPy and assuming that PyViennaCL would be similar -- but a few
>> such tutorials certainly wouldn't go amiss.
>
> The less expertise a package assumes from its users, the better and more 
> useful it usually is :-) Python's success is the best evidence :-)

Right. What sort of first steps tutorials should I include? I don't know
what would be too basic..

Creating vectors, sparse and dense matrices? Basic manipulations
(including matrix multiplication)? An introduction to the pitfalls of
mixing numeric types ('dtypes')? A comparison between NumPy and
PyViennaCL with regards to the * operator?

What about more advanced stuff, like using the solvers? A fair amount of
this stuff has example code in the tests..!

>> This does remind me that there is one thing I ought to fix:
>>
>>    >>> A = p.Matrix(10, 10, 0.5)
>>    >>> B = p.Matrix(10, 10, 0.9)
>>    >>> C = A + B
>>    >>> D = p.Matrix(5, 5, 3.0)
>>    >>> C[0:5,6:10] = D
>>    Traceback (most recent call last):
>>      File "<stdin>", line 1, in <module>
>>    TypeError: 'Add' object does not support item assignment
>>    >>> C[0:5, 6:10]
>>    Traceback (most recent call last):
>>      File "<stdin>", line 1, in <module>
>>    TypeError: 'Add' object has no attribute '__getitem__'
>
> Shouldn't be too hard :-)

Done!


Toby



------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to