Numpy NdArray 记忆化
我正在研究一些处理 numpy 矩阵和 ndarray 的计算量相当大的计算,通过一些挖掘,有大约十几种方法不来实现记忆化,通常充满了冲突和问题ndarrays 是可变对象。
有没有人遇到过可以处理 numpy 对象的相当通用的记忆装饰器?
I'm working on some fairly computational intensive calculations that deal with numpy matrices and ndarrays, and from some digging around, there are about a dozen ways not to implement memoization, generally full of collisions, and issues with ndarrays being mutable objects.
Has anyone come across a fairly general memoisation decorator that can handle numpy objects?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这个包怎么样:
http://packages.python.org/joblib/memory.html2021更新
https://joblib.readthedocs.io/en/latest/ generated/ joblib.Memory.html
How about this package:
http://packages.python.org/joblib/memory.html2021 update
https://joblib.readthedocs.io/en/latest/generated/joblib.Memory.html
另一种选择是我的包壶:
http://packages.python.org/Jug
它类似于 joblib ,但方法略有不同。
An alternative is my package jug:
http://packages.python.org/Jug
It is similar to joblib, but with a slightly different approach.