Memory leak when casting np.float32 to int with Numpy 1.14.0
See original GitHub issueHello, running the code below with Numpy 1.14.0 will result in fast growing memory usage until the OS kills the process.
import numpy as np
test = np.float32(3.14)
while True:
x = int(test)
Tested with Python 2.7.12 on Win10 x64 and on Linux Mint 17.4 x64.
The bug is not reproducible with Python 3.6.3.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Memory leak when returing a numpy array - Stack Overflow
I am analyzing a large amount of data with numpy/pandas by sorting ... may be caused by the extra memory allocated by np.ndarray.flatten()...
Read more >Release Notes — NumPy v1.14 Manual
The change in 1.14.0 that multi-field indexing of structured arrays returns a view instead of ... #9746 BUG: Memory leak in np.dot of...
Read more >Release Notes — NumPy v1.14 Manual
Numpy 1.14.0 is the result of seven months of work and contains a large number of bug fixes ... #9746 BUG: Memory leak...
Read more >14 Simple Tips to save RAM memory for 1+GB dataset - Kaggle
import pandas as pd import numpy as np import warnings ... Average memory usage for float columns: 14.07 MB Average memory usage for...
Read more >1541 NumPy 1150 Release Notes 411 NumPy User Guide Release ...
For simplicity, for generalized ufuncs that operate on 1-dimensional arrays (vectors), a single integer is accepted insteadof a single-element tuple, and for ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hehe, OK, I already did it anyway, just two lines of code 😃, there is a second conversion step in Py2, and there was a DECREF missing.
@seberg I’m not a Python dev, so no.