[MATRIX-SIG] two newbie questions

Kelvin Lee acura@vcn.bc.ca
Wed, 23 Jul 1997 18:49:02 -0700 (PDT)


I'm still struggling to get a handle on NumPy... Two newbie questions:

1) How much memory does an NxN Float16 matrix use?

2) What's the most efficient way of constructing a "correlation-like"
   matrix of a given function for a data set? eg. using, say, RMSE instead
   of r?

To show you where I'm at, I'm stuck with:

def correlation_like(X, function):
    R = zeros((len(X), len(X)), Float16)
    for j in range(len(X)):
        for i in range(len(X)):
            R[i,j] = function(X[i], X[j])
    return R

Obviously this doesn't take into account symmetry etc. Any ideas to get me
thinking in a matrix kind of way would be appreciated!

Kelvin


_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________