numpy tag

NumPy (pronounced /ˈnʌmpaɪ/ (NUM-py) or sometimes /ˈnʌmpi/ (NUM-pee)) is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. The ancestor of NumPy, Numeric, was originally created by Jim Hugunin with contributions from several other developers. In 2005, Travis Oliphant created NumPy by incorporating features of the competing Numarray into Numeric, with extensive modifications. NumPy is open-source software and has many contributors. NumPy is a NumFOCUS fiscally sponsored project.

Reference: WIKIPEDIA

137 questions


1 answers
47 views
0
I am looking for a NumPy array function that functions the same as index() in the list

Usually, in Python lists, l = list(1,2,3)l.index(2)I'm using index(x) to find the location of item x, but I can't find this function in NumPyarray

2 years ago

1 answers
41 views
0
Python multiplication question.

import numpy as npr_a = np.arange(500, 50000, 500) # mr_b = np.arange(150, 15000, 150) # ma = 3*r_a + r_bb = r_a + 3*r_ba * bWhen I ran the code above, I thought it was a structure that couldn't produ...

2 years ago

2 answers
49 views
0
Create a two-dimensional array with 2d coordinates as elements in numpy

Hello, I'm asking you a question because I encountered a difficulty in creating an array with numpy.Now we want to create a two-dimensional array with two-dimensional coordinates (x, y) as an element....

2 years ago

1 answers
43 views
0
I want to extract columns of certain conditions from Numpy.

I want to extract columns of certain conditions from Numpy. An array of numpy was obtained using Pandas in the dataset.[[0.2 0. 0. ... 0. 2. 2. ] [0.2 0. 0. ... 0. 2. 2. ] [0.55 0. 0. ... 0. 0. 0. ] [...

2 years ago

1 answers
119 views
0
I don't understand the process of putting the array in the index position of the array in Numpy. (Example> 3d_array[2d_array])

During the image processing process using numpy, there is a part of the code that I don't understand, so I'm posting a question.import numpy as npimage = np.array([[[1,1,1],[1,1,1]],[[1,1,1],[1,1,1]]]...


1 answers
44 views
0
[Python] Inquiries on how to prevent it from appearing as scientific notation

There is a Pandas data frame, and one column is timestamp.The value is expressed as 1518586207202I want to represent this divided by 1000 as an integer. So if you try df1.timestamp/1000This is 1.51858...


1 answers
116 views
0
About installing numpy in python

I looked it up and found that numpy can be installed as exe. What is the difference between installing through pip and installing through exe file?

2 years ago

2 answers
45 views
0
Python numpy, I have a question

>>> import numpy asp>>> g = np.arange(1,10).reshape(3,3)>>> garray([[1, 2, 3], [4, 5, 6], [7, 8, 9]])>>> g[1, 2]6>>> g[2]array([7, 8, 9])>>> g[[...

2 years ago

1 answers
42 views
0
gffromtxt question (mixed format - string, float)

It contains the following files (asset.csv):import numpy as npdata_arr = np.genfromtxt('asset.csv',encoding='ascii' ,delimiter=',', dtype=None)Use the corresponding code array([('G1', 1, 100, 5, 0), ...

2 years ago

2 answers
70 views
0
Python Repeated Variable Declaration

array1 = np.array(img[y+1,x])array2 = np.array(img[y+2,x])array3 = np.array(img[y+3,x])array4 = np.array(img[y+4,x])array5 = np.array(img[y+5,x])array6 = np.array(img[y+6,x])array7 = np.array(img[y+7,...

2 years ago
« - 12 - »

© 2024 OneMinuteCode. All rights reserved.