Merge lp://staging/~mostawesomedude/meliae/trunk into lp://staging/meliae
Proposed by
Corbin Simpson
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | 186 |
Merged at revision: | 186 |
Proposed branch: | lp://staging/~mostawesomedude/meliae/trunk |
Merge into: | lp://staging/meliae |
Diff against target: |
21 lines (+11/-0) 1 file modified
meliae/scanner.py (+11/-0) |
To merge this branch: | bzr merge lp://staging/~mostawesomedude/meliae/trunk |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John A Meinel | Approve | ||
Review via email:
|
Description of the change
This adds numpy ndarray sizing, which is kind of important for a handful of projects. Hope it's useful!
~ C.
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Does this handle both 64 and 32-bit environments? It looks fine to me,
but I don't know the details of ndarray.
John
=:->
merge: approve
On Fri, Feb 18, 2011 at 7:23 PM, Corbin Simpson
<<email address hidden> <mailto:<email address hidden>>> wrote:
Corbin Simpson has proposed merging
lp:~mostawesomedude/meliae/trunk into lp:meliae.
Requested reviews:
Meliae Development Team (meliae-dev)
For more details, see: /code.launchpad .net/~mostaweso medude/ meliae/ trunk/+ merge/50422
https:/
<https:/ /code.launchpad .net/%7Emostawe somedude/ meliae/ trunk/+ merge/50422>
This adds numpy ndarray sizing, which is kind of important for a
handful of projects. Hope it's useful!
~ C. /code.launchpad .net/~mostaweso medude/ meliae/ trunk/+ merge/50422
--
https:/
<https:/ /code.launchpad .net/%7Emostawe somedude/ meliae/ trunk/+ merge/50422>
You are subscribed to branch lp:meliae.
=== modified file 'meliae/scanner.py' get_referents special_ size = _scanner. add_special_ size
--- meliae/scanner.py 2010-08-10 16:20:09 +0000
+++ meliae/scanner.py 2011-02-19 01:22:52 +0000
@@ -27,6 +27,17 @@
get_referents = _scanner.
add_
+def _size_of_ ndarray( ndarray_ obj): special_ size("numpy. ndarray" , _size_of_ndarray, _size_of_ndarray)
+ """
+ Return the size of a Numpy ndarray's internal storage.
+
+ Doesn't yet handle views into other arrays.
+ """
+
+ return ndarray_obj.nbytes
+
+add_
+
def dump_all_ referenced( outf, obj, is_pending=False):
"""Recursively dump everything that is referenced from obj."""
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
mlNsACgkQJdeBCY SNAAOXRACgxyXbr NOeJ5MRFSm3pM4v iWhV ep1/wTlRA6w8Zpl IL+5W
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk1
8hkAnAz6rpX/
=QArt
-----END PGP SIGNATURE-----