115,283 questions
5
votes
1
answer
101
views
BPTK-Py: base ** variable_exponent in equation returns 1.0; np.power/np.log not supported on Converter
I’m building a simulation in BPTK-Py and need a power with a variable exponent inside a node equation:
Resale_Value_DM1.equation = 1 - Depreciation_DM
Resale_Value_DM2.equation = Resale_Value_DM1 ** ...
-5
votes
0
answers
45
views
Upgrade to 3.14 causes np.float64 to print in output--how do I fix? [closed]
I recently upgraded to Python 3.14. This caused the below weird output in my dataframe:
Stock Price ATM Theta Return Roll Avg
0 SOFI np.float64(29.68) np....
0
votes
2
answers
65
views
unable to install pytidycensus
I tried to install pytidycensus per these instructions: https://mmann1123.github.io/pytidycensus/index.html
pip install pytidycensus
OS Windows 11, current as of 10/31/2025, with Python 3.13.7 ...
3
votes
3
answers
84
views
numpy vectorise approach to creating array results computed from indices
What is an efficient numpy way of achieving an array of results based on a pair of index datasets?
So, lets say there are 2 arrays these are the row and column headers in the table underneath:
a = [1,...
0
votes
0
answers
63
views
RecursionError in YouCompleteMe for Python Docs in VIm
I am trying to use YouCompleteMe in Vim for getting python documentation (using YcmCompleter GetDoc and the vim pop up menu). This works well for normal python commands, but there seems to be various ...
1
vote
1
answer
59
views
EDL generation with python 3.10 (imagehash & numpy) produces complete nonsense on a greater amount of files
I have a directory of ca. 1600 PNGs (1000x400 res. previews of frames) and want to generate an EDL so I do not have to render the same frame several times.
So far, I have successfully run the ...
3
votes
2
answers
114
views
Expanding np.memmap
I have huge np.memmap objects and need to expand them regularly. I was wondering if my current approach is safe and also the most efficient one and started searching the internet. I stumbled across ...
-2
votes
0
answers
67
views
Doing an assigment on image processing using python and google colab [closed]
The first part of the assigment is to turn a picture of my face, edit it to grayscale and then seperatly add in a sobel, prewitt and canny edges. I have done the code and it runs but i would like any ...
3
votes
1
answer
110
views
Build numpy 2.3+ without accelerated libraries
Related post: Compile numpy WITHOUT Intel MKL/BLAS/ATLAS/LAPACK
Recent versions of numpy use meson for build configuration, I can build numpy from source but failed to exclude BLAS/LAPACK/... deps.
...
1
vote
0
answers
129
views
What does np.ones_like represent in a quiver plot of a differential equation?
I found some similar questions about quiver plots and direction fields, but I’m still confused about the meaning of these two lines in many examples:
What do dx = np.ones_like(f) and dy = f mean in a ...
2
votes
1
answer
61
views
Does `jax` compilation save runtime memory by recognizing array elements that are duplicated by indexing
Consider the example code:
from functools import partial
from jax import jit
import jax.numpy as jnp
@partial(jit, static_argnums=(0,))
def my_function(n):
idx = jnp.tile(jnp.arange(n, dtype=int)...
-1
votes
0
answers
104
views
C++ app cannot find Numpy C API even though numpy is installed [closed]
I am deploying a C++ application that at some point allows the user to load and run a Python script. For this, I am loading the C API of Python and Numpy. This is done by calling the function ...
1
vote
0
answers
91
views
Convert NETCDF files into TIF files
I’m creating a Python program that converts NetCDF files into GeoTIFFs, allowing the user to select the variable and time step using a Tkinter interface.
The conversion works, but I’m having a ...
1
vote
2
answers
99
views
Why does NumPy load() take longer in a larger script than in another?
I scan for a trigger and when I get it, load a .npy file and process it. It started to take almost 2 seconds to load the NumPy file from within the process but when I tried to load the same file from ...
4
votes
1
answer
77
views
Obtaining cumulative product for a list elements
I tried to calculate the cumulative products for my list elements as below. In my list, each element is two-dimensional list:
import numpy as np
Orig_list = [[[1,2,3], [4,5,6], [7,8,9]], [[11,3,4], [...