py tag

191 questions


3 answers
127 views
0
Understanding How to Obtain Coordinates from Graphs

Currently, I was going to use where in fill_between, but I couldn't because the x coordinates and the number of data are different.(x1,z1) = 15 points(x2,z2) = 3031 pointsBelow is the program.f1=np.lo...


1 answers
107 views
0
AttributeError: module 'numpy' has no attribute 'bool_'

Virtualbox Ubuntu In Python Interactive Modeimport tensorflowI typed AttributeError: module 'numpy' has no attribute 'bool_'The error appears.When I entered import numpy, there was no error.Please let...

1 years ago

1 answers
88 views
0
Compute matrices in PyTorch

I'm using PyTorch to learn in-depth learning.I use numpy's np.tile and np.reshape in the forward calculation, but if I convert the Tensor type to numpy's ndarray type, the requirements_grad informatio...


2 answers
63 views
0
Understanding How to Give Indexes When Converting a Numpy Array to Dataframe

When converting an n-dimensional numpy array to dataframe, we would like you to tell us how to create a data frame such that the first column of dataframe is a first-dimensional index, the second-dime...

1 years ago

1 answers
91 views
0
I want to create a branch based on the contents of the variables entered in input.

My first programming was Python, and I'm a super beginner with a day of Python history.Based on height and weight, we have created a program that determines whether you are overweight, just right, or ...

1 years ago

1 answers
102 views
0
Error only occurs when scipy.minimize is L-BFGS-B

In order to minimize the function with variable constraints, we specified L-BFGS-B in scipy.optimize.minimize as follows.import scope.optimize as optbound=opt.Bounds(#np.ndarray, #np.ndarray)result=op...

1 years ago

1 answers
119 views
0
Unable to import Numpy in python 3.7

I want to download Anaconda and use Numpy in Python 3.7 in the package, but when I type import numpy as np, I get the error ModuleNotFindError: No Module Named 'numpy'.I tried the following solution, ...

1 years ago

1 answers
71 views
0
I want to resolve the error statement. object of type 'numpy.float128' has no len()

I'm a python beginner.I'm trying to show the result of nv calculated by numpy on a bar graph.import numpy as npnv_fw = np.longdouble(0)nv_df = np.longdouble(0)for trial inv: for i in range(0,len(trial...

1 years ago

1 answers
70 views
0
module 'numpy' has no attribute 'linarg'?

After running the following program,#coding:utf-8import numpy as npdefcos_sim(v1,v2): return np.dot(v1, v2)/(np.linarg.norm(v1)*np.linarg.norm(v2)))x = np.array ([1,1,1,1,1,1])y = np.array ([1,0,1,0,1...

1 years ago

1 answers
117 views
0
Understanding Some Drawings of SymPy Graphs

I have a question about the graph of the formula created by SymPy.Take the following sample code as an example: the first quadrant on a coordinate plane with a primary function and a circle.A total of...

1 years ago
« - 4 - »

© 2024 OneMinuteCode. All rights reserved.