A Saturday 21 March 2009, Paul Northug escrigué:
[clip]
> numpy arrays are not hashable, maybe for a good reason.
Numpy array are not hashable because they are mutable.
> I tried
> anyway by keeping a dict of hash(tuple(X)), but started having
> collisions. So I switched to md5.new(X).digest()
On Sat, Mar 21, 2009 at 07:18:56PM +0100, Paul Northug wrote:
> I would like to 'memoize' the objective, derivative and hessian
> functions, each taking a 1d double ndarray argument X, that are passed
> as arguments to
> scipy.optimize.fmin_ncg.
I have develop a library that does this. It uses hea
Paul Northug schrieb:
> I would like to 'memoize' the objective, derivative and hessian
> functions, each taking a 1d double ndarray argument X, that are passed
> as arguments to
> scipy.optimize.fmin_ncg.
>
> Each of these 3 functions has calculations in common that are
> expensive to compute and
I would like to 'memoize' the objective, derivative and hessian
functions, each taking a 1d double ndarray argument X, that are passed
as arguments to
scipy.optimize.fmin_ncg.
Each of these 3 functions has calculations in common that are
expensive to compute and are a function of X. It seems fmin_