Skip to main content
Filter by
Sorted by
Tagged with
4 votes
1 answer
122 views

Given a closed-form function f(x,y,z), what is the most efficient way to fill up a 3D ndarray arr[z][y][x] with the values of f(x,y,z)? For example, if I wanted a 3D ndarray arr[z][y][x] with each ...
Towelmonkey's user avatar
4 votes
2 answers
228 views

I've been trying to parallelize some code that I wrote in python. The actual work is embarrassingly parallel, but I don't have much experience with multiprocessing in Python. The actual code I'm ...
user2506833's user avatar
4 votes
1 answer
177 views

I'm working on numerical simulations. I ran into an issue with large NumPy arrays (~ 26 GB) on Linux with 128 GB of RAM. The arrays are of type complex128. Arrays are instantiated without errors (if ...
laserpropsims's user avatar
2 votes
2 answers
70 views

I have a list of points such as [(x, y), …] I want to convert it in a numpy.array() such as [[0,0,1,…], …], 1 representing a point of the list. According that np.array().shape is : ( max(x)-min(x)+1, ...
Tawal's user avatar
  • 111
2 votes
2 answers
142 views

I'm making a meshgrid to represent background radiation levels, but I'd like it to be less noisy. My implementation is trivial, I've plotted import numpy as np x = np.linspace(-2, 2, 100) y = np....
Space cat 321's user avatar
1 vote
1 answer
86 views

Is there a simple syntax for creating references to an arbitrary number of neighbouring array elements in numpy? The syntax is relatively straightforward when the number of neighbours is hard-coded. A ...
DavidJ's user avatar
  • 440
1 vote
1 answer
102 views

Because plain dict is not adequate for inheritance, I design the following MyDict with UserDict in python standard libraries: import numpy as np from collections import UserDict class MyUserDict(...
DrizzleatDusk's user avatar
1 vote
0 answers
16 views

I start with a 0 by 0 matrix that I want to expand to a (1,1) matrix, then (2,2) etc. I also want to have the columns named, so the (0,0) matrix would increase to: First First 0 then ...
Guy Eric Matz's user avatar
1 vote
1 answer
60 views

I have a Python numpy.ndarray of seconds of the day with a bunch of decimal seconds: import numpy as np sec = [40389.66574375, 40390.12063928, 40391.32714992, 40392.64457077, 40393.48519607, 40394....
Swawa's user avatar
  • 273
0 votes
0 answers
45 views

I have a holoscan Application, a MiddleOperator where I take a Tensor, i want to convert this Tensor to ndarray, do something with it, and emit to "out". import os from holoscan.core import ...
Qendrim Krasniqi's user avatar
2 votes
2 answers
149 views

I just want numerically integrate the Lorenz' famous 3 equations I create this code that seems perfectly work: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import ...
Ged's user avatar
  • 37
0 votes
0 answers
60 views

I am trying to create a buffer array that creates extra indexes of the numpy so I can assign rather than using functions like np.append and where "children" sliced array can still be a view ...
THATS MY QUANT MY QUANTITATIVE's user avatar
3 votes
0 answers
218 views

TL;DR: Initally I thought the numpy load functions doubles memory usage at peak after some additional tests it seems like the underlying file system (StorNex [cfvs]) leads to a size-independent 2GB ...
Helmut's user avatar
  • 506
0 votes
1 answer
86 views

The numpy.arange function takes the three parameters: start, stop, step (positional args.) The default step is 1. Throughout my entire Numpy experience, the last element of the resultant array is not ...
VizDracViz's user avatar
1 vote
0 answers
120 views

I cannot generate a QImage with some text on it, keep it in memory, and then successfully display it on a pyqtgraph.ImageItem which needs it as an np.ndarray import sys import numpy as np import ...
Andrei M.'s user avatar
  • 413

15 30 50 per page
1
2 3 4 5
263