I have written a program where it takes a radius range(R to 5) and theta range(0 to 2pi). It converts the polar coordinates to Cartesian coordinates. Then I hav
How do I check which rows of one small array exists in another larger one? Given the following setup: final_batch = np.emtpy((batch_size,2)) batch_size = 4 a =
I have a, xarray dataset that is ocean color of the Atlantic Ocean called olci_ds. This dataset has dimensions of rows and columns and coordinates of lat, lon a
I am using python 3.9.8 and pycharm on a macbook m1. I have already installed openblas with homebrew but I still get the error below. I tried installing SciPy v
I am trying to write a code that calculates the speckle contrast of a laser line. Here is an example of an image that I would be analyzing: The image is black w
Hi all as with many peeps, I am new to python. Updated script that runs to completion but has a OptimizeWarning: Covariance of the parameters could not be estim
I currently have ~1000 files containing bytes. Each file contains a few thousand messages, each message has identical data types. I've tried several ways of rea
There is np.stack in NumPy, but is there an opposite np.unstack same as tf.unstack?
How can I use scipy.interpolate.interp1d when my x array is an N-D array, instead of a 1-D array, without using a loop? The function f from interp1d then needs
I have found return numpy array as image from fastapi but I am still struggling to show my image which just appears as a white square. I read an array into io.B
I am getting errors while generating maps of h3 moments in python for an image file called "image_test". The error apparently is for the shape of the values tha
If I have two arrays that are identical except for a shift: import numpy as np from scipy import signal x = [4,4,4,4,6,8,10,8,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4] y =
I have a few dataframes that I'm merging based on known, populated fields. The resulting dataframe will always contain a set of columns, but may or may not have
I am trying to loop through my table and to create 3 different figures. This is my code .... tab_stat = pd.read_table('test.txt', delim_whitespace=True) radius
I am stuck with this code written in py2 on psychopy. I am not an expert with coding. I am trying to run the function "analyzeStaircases(stairs, stairInfo['Aver
Consider the following vector: import numpy as np u = np.random.randn(5) print(u) [-0.30153275 -1.48236907 -1.09808763 -0.10543421 -1.49627068] When we print
Working with human labeled data, I have four cases that cover correct behavior, but it is possible for annotators to miss the need to provide a value. When this
I am looking to build a numpy extension module which declares a new structured dtype and provides the necessary inner ufunc loops to allow built-in math operati
So my aunt plays this now popular mobile game, shown in the picture below. She got stuck on a certain level and asked me if I can solve it. Knowing that I'm not
I try to stack three one dimension array. a and b are int that can be work as index and c is float. After I stack this three with axis=0, the a and b data chang