1
votes

1
replies

I want to generate a four dimensional array with dimensions (dim,N,N,N). The first component ndim =3 and N corresponds to the grid length. How ca...

asked 1 month ago

0
votes

1
replies

I'm trying to write a piece of code that given two lists of numbers, finds the beta coefficient. This can be done by finding the slope of the lin...

asked 1 month ago

0
votes

1
replies

I'm trying to make a "heatmap" with Matplotlib of a 2d Numpy Array and found the NonUniformImage option here. Below is a simple single version. U...

asked 1 month ago

1
votes

1
replies

I have an array on which I must modify some values. In order to do so, I have to change the order of elements of the array, after having changed...

asked 1 month ago

1
votes

1
replies

I'm dealing with some simulations in Python and I have the following code:
import numpy as np
import matplotlib.pyplot as plt
from statsmodels.s...

asked 1 month ago

1
votes

1
replies

If I had the following data:
+---------------+---------------------+---------------------+----------+--------------+
| email | date_open...

asked 1 month ago

-2
votes

0
replies

I am setting up a table which should settle down mapping of MAC against same user and discard the last one if exceeds the allowed limit.
Followi...

asked 1 month ago

0
votes

1
replies

I have a 1D array of sgape (4) as follow:
['rsmin_025_lai_chtessel'
'rsmin_050_lai_chtessel'
'rsmin_075_lai_chtessel'
'rsmin_100_lai_chtess...

asked 1 month ago

-2
votes

1
replies

My problem is that i can't import numpy into my processing.py project. When I try to import it i get the error "No module named numpy". What ca...

asked 1 month ago

-1
votes

2
replies

I have R script which calculates the Intercept according to the code mentioned below
library(zoo)
data = matrix(rexp(200), 10)
X <- data[,3]...

asked 1 month ago

0
votes

1
replies

I am attempting to append results to an ongoing csv file. Each result comes out as an nd.array:
[IN]: Print(savearray)
[OUT]: [[ 0.55219001 0....

asked 1 month ago

0
votes

1
replies

I have a numpy array of shape (128,128,3) loaded from a PNG using ImageIO.
Dimension 3 seems to represent RGB values. In this instance all value...

asked 1 month ago

0
votes

4
replies

My problem is quite a simple one, however I can't seem to find a quick solution.
I would like to interpolate the y_model array which is defined...

asked 1 month ago

-1
votes

0
replies

I have created a pandas series that holds 2D numpy array.
Numpy array in each row is of different shape.
0 [[15, 131, 232], [62, 150, 250...

asked 1 month ago

-1
votes

0
replies

matrix
A matrix (a matrix of red lines) is known to find all occurrences in another matrix. As shown, in a multidimensional array, I need to matc...

asked 1 month ago

0
votes

2
replies

I have a row of ints that I would like to add as a column to a 2D matrix of floats. So when combined, the first column would be the column of int...

asked 1 month ago

0
votes

1
replies

I'm trying to code a neural network with 3 input nodes, a hidden layer with 4 nodes, and 1 output node. (This will change in the final version, s...

asked 1 month ago

1
votes

1
replies

EDIT: Code edited to produce results consistent with Matlab. See below.
I am converting Matlab scripts to Python and the linear interpolation re...

asked 1 month ago

2
votes

3
replies

I have SPI timeseries of length 324 and values ranging from -3 to +3. I want to get the indices of places where 3 or more consecutive timesteps a...

asked 1 month ago

0
votes

0
replies

New to using pandas and need to convert some SAS code. Trying to create a column and set a value if multiple other column conditions are met.
H...

asked 1 month ago

0
votes

1
replies

I am trying to create an array of neighbors for each element in an array. Is there a way to use vectorisation techniques to speed it up?
I've us...

asked 1 month ago

0
votes

1
replies

I'm currently experiencing some unexpected behaviour in numpy. I am trying to add a column to a DataFrame which does some math on two other colum...

asked 1 month ago

2
votes

0
replies

I'm really having trouble trying to get this project of mine up and running, but I'm remaining resilient and I think I'm close!
I'm trying to c...

asked 1 month ago

3
votes

1
replies

I need to know if there's a faster way to get the LBP and the resulting histograms of the MNIST dataset. This will be used for handwritten text r...

asked 1 month ago

1
votes

0
replies

So I have a pandas DataFrame that looks like this:
r vals positions
1.2 1
1.8 2
2.3 1
1.8 1
2.1 3
2.0 3
1...

asked 1 month ago