py tag

191 questions


1 answers
111 views
0
random walk with boundary conditions

While generating random numbers on the stage below (3D), when random walking, I wrote the following code using stage as a conditional statement, but sometimes it works well and sometimes it doesn't.I ...

2 years ago

1 answers
52 views
0
IndexError: understanding too many indications for array

I don't know why this error occurs.The code I wrote looks like this.>>>if__name__==_main__:... data1 = np.genfromtxt('./ozon_sheet.csv')... x1 = data1 [:,1]... Traceback (most recent call l...

2 years ago

1 answers
50 views
0
Runtime warning in power of np.array

Please let me know as I was at a loss because the power of the 2D array of numpy (power by element) could not be successful.Environment:Python: 3.7.5Number: 1.17.4 If you try to multiply the float32 t...

2 years ago

2 answers
52 views
0
I want to randomly extract data from the list and create a new list of data.

I have a matrix list of 100x3 as shown below.There are two things I would like to do for this matrix: ·I would like to randomly extract two lines at any number of times (e.g., 3 times).ex)[[a1, a2, a3...

2 years ago

3 answers
77 views
0
I'm looking for a tetrahedral (triangle pyramid) inscribed sphere sympy. I tried it on the vba solver.

四 I'm looking for the sympy of the tetrahedral (triangle pyramid) inscribed sphere.In other languages.②I tried running it on the vba solver. Please tell me how to shorten the vba code.Only one example...

2 years ago

1 answers
54 views
0
Method of calculating correlation coefficients for each sample in Python 3

Using Python, based on existing DataFrame (Data Set Before Processing (df) below), correlation factor I would like to discharge .The specific data set image looks like the After-Processed Data Set bel...

2 years ago

1 answers
59 views
0
How to Output a Value with Changed Random State

I am outputting while changing random state in machine learning.For example, is it possible for the following program to output random state from 0 to 20 all values?Currently, I manually change from 0...

2 years ago

1 answers
71 views
0
I don't understand the flow of the correlation matrix calculation

I don't understand the flow of the correlation matrix calculation.#Create correlation matrixR=np.corrcoef(X.T)# set the diagonal component to zero_R=R-np.identity(10)# Get index with maximum correlati...


2 answers
48 views
0
How to Calculate Each Row of a Matrix in a For Loop

There are 201 vectors of length 3575 and they are stored in the numpy.ndarray format. For ease of explanation, use x.I'd like to calculate for each line of this x, a vector whose shape is (13575), but...

2 years ago

2 answers
68 views
0
One-dimensional error occurs in Pandas.

array([-1, 0, 1, 1, 1, 0, 2, 3, 4, 5, 6, 7, 8, 7, 0], [-1, 9, 10, 11, 12, 11, 13, 11, 14, 11, 15, 12, 16, 17, 18], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...

2 years ago
« - 10 - »

© 2024 OneMinuteCode. All rights reserved.