py tag

191 questions


1 answers
61 views
0
When you create DataFrame using a for loop in Python, all the different variables have the same result.

Questions about Python and Pandas' programs:The following six variables are series with index datetimeindex with different periods and data.Differences between 1 and 3 vary in duration, and a and b di...

2 years ago

2 answers
51 views
0
I don't know how to improve the error code. SyntaxError: invalid character identifier

I get an error when I execute the code below, but I don't know where to improve it.Dis_sample=[]for_in range(10): PP=np.random.choice (P_sample_all.shape[0], 2, replace=False) PP_sample.append(PP)   D...

2 years ago

1 answers
50 views
0
COUPLING DATA IN COLUMN DIRECTION

Up until now, we have connected the two data in the column direction using the following code.Each row * column has data1 in the form of 2*32, data2 in the form of 5*32, and data3 in the form of 8*32....

2 years ago

1 answers
56 views
0
Cannot import name 'NUMPY_MKL' error when using sklearn

I get the same error when I import and use a package that is python.You can see numpy, scikitlearn, pandas, etc.The code itself does not display an error, but the following error appears on the consol...

2 years ago

1 answers
65 views
0
IndexError: too many indications for array due to operation on element of numpy array

When I wrote the following Opencv program on Python,#-*-coding:utf-8-*-import cv2import numpy as npth = 100# Acquisition of background and input imagesim_bg = cv2.imread('kyousitu2.jpeg')im_in=cv2.imr...

2 years ago

1 answers
55 views
0
Could not broadcast is displayed

I'd like to set up a diagnostic imaging program, but I get the following error.I'm using google collateral and I'm trying to upload some of them from kaggle's Chest X-Ray Images (Pneumonia) dataset to...

2 years ago

3 answers
55 views
0
In Numpy, we want to generate an n-dimensional random vector under the constraint that the sum of the number of elements is N.

I would like to create an n-dimensional random vector v with Numpy.I want the sum of the elements of the vector to be N.For example, If n=4 and N=1, v=np.array([0.1, 0.3, 0.2, 0.4])Or If n=6 and N=3, ...

2 years ago

1 answers
100 views
0
About Floating Point Bool Determination

Attempting to reproduce pytorch's torch.nn.Linear module with numpy.As the result showed some errors, I rounded off the decimal point and printed out the decision of the bool.Why does the result of tr...


1 answers
119 views
0
I want to find the standard deviation of the arrangement at once.

I use python and numpy to calculate the standard deviation into an array, but since I use for, it is very slow and troublesome.I would appreciate it if there was a way to find the standard deviation o...

2 years ago

1 answers
123 views
0
There is a difference between the point of acquisition with pyautogui and the HSV value when reloading after saving the same image.

Regarding the title, I was at a standstill because I didn't know the cause.QuestionsIn Python, I have written a program to compare the following two HSV values.Convert images from pyautogui.screenshot...

« - 8 - »

© 2024 OneMinuteCode. All rights reserved.