Chris Lasher wrote:
> Now that's definitely what I'm looking for! Thanks!
>
> By the way, was this line
>
> In [5]: C = repeat(B, [1,2,1], axis=-1)
>
> supposed to have a positive 1 value for axis? It works either way, I
> see. Is it like a lookup, where an index of -1 returns the last value?
>
Now that's definitely what I'm looking for! Thanks!
By the way, was this line
In [5]: C = repeat(B, [1,2,1], axis=-1)
supposed to have a positive 1 value for axis? It works either way, I
see. Is it like a lookup, where an index of -1 returns the last value?
If that were true, I supposed the eval
Chris Lasher wrote:
> Hello Pythonistas!
> I'm looking for a way to duplicate entries in a symmetrical matrix
> that's composed of genetic distances. For example, suppose I have a
> matrix like the following:
>
> ABC
> A 0.00 0.50 1.00
> B 0.50 0.00 0.50
Hey Gerard,
Thanks for the suggestion! It took me a while to figure out how to get
this to work. Two things were important: I needed to use the
matrixmultiply() function, and the order of the two matrices being
multiplied is critcial. Here's how I got the example to work.
>>> from Numeric import
ed any of
> them, but I am not sure if any of them possess a simple means to
> duplicate entries in a matrix. I started writing code on my own but I
> can see it is becoming exponentially more complex, and before I proceed
> any further, I want to make sure I'm not reinventing
is for are more complicated, naturally,
where I want to duplicate different entries different numbers of times.
I'm aware of Numeric, Numarray, and NumPy, though I've not used any of
them, but I am not sure if any of them possess a simple means to
duplicate entries in a matrix. I started writing