On 10/24/07, Peter <[EMAIL PROTECTED]> wrote:
>
> Sean Davis wrote:
> > Just a quick question, I hope. I am trying to draw a heatmap of a numpy
> > array.
>
> Could you try using a Numeric array instead for comparison, as that
> works for me while numpy does not (on a rather out of date rpy 0.4.6
> with R 2.2.1 under Linux Ubuntu Dapper Drake).
>
> FYI: There is an example online here using a Numeric array:
> http://www.warwick.ac.uk/go/peter_cock/python/heatmap/
>
> Peter
I am using R-devel (2.7.0) and python 2.5. Rpy is 1.0RC3.
In [37]: a=Numeric.array([1,2,3,4,5,6],Numeric.Float)
In [38]: a.shape=2,3
In [39]: r.heatmap(a)
---------------------------------------------------------------------------
<class 'rpy.RException'> Traceback (most recent call last)
/home/sdavis/<ipython console> in <module>()
<class 'rpy.RException'>: Error in function (x, Rowv = NULL, Colv = if
(symm) "Rowv" else NULL, :
'x' must be a numeric matrix
So, looks like something is wrong here. In your example, this appears to
work for you. I didn't check the previous versions all the way back to see
where things might have changed or if there is a local problem for me.
Sean
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list