A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://stackoverflow.com/questions/tagged/numpy below:

Newest 'numpy' Questions - Stack Overflow

8 votes

1 answer

89 views

Cupy throwing a unhashable type: 'ndarray' when appending nested tuples to a set

For a project we are trying to convert numpy code to cupy code for the speedup, but we are getting this error: TypeError: unhashable type: 'ndarray' When we run import cupy as cp newMat = cp.array([[ ...

asked Aug 13 at 20:35

0 votes

2 answers

142 views

How to take multiple arrays and turn them into vertical tables?

I am using numpy and matplotlib, I have multiple arrays: products = np.array(["laptop","smartphone","tablet"]) price = np.array([2999.99,1099.99,1009.99]) ...

asked Aug 13 at 7:59

1 vote

2 answers

64 views

ValueError when fitting model: Expected 2D array, got 1D array instead

import numpy as np from sklearn.linear_model import LinearRegression X = np.array([1, 2, 3, 4, 5]) # Features y = np.array([2, 4, 6, 8, 10]) # Target model = LinearRegression() model.fit(X, y) # &...

asked Aug 13 at 6:16

2 votes

2 answers

64 views

How can i set the ticks of ax and ax2 to the same position but I have different scales?

I have this python code snippet that sets the ticks of the two y-axes. But I can't figure out how I can synchronize the axe's scales. if y_data_left: all_left = pd.concat([y for _, y, _, _ in ...

asked Aug 13 at 5:33

1 vote

1 answer

153 views

Can I decrease the numeric precision of scikit-learn's predict_proba() method? [closed]

The question behind the question is that I am looking to decrease the runtime of and computational resources expended by my scikit-learn model when using it in production. When I run predict_proba(), ...

asked Aug 11 at 16:51

2 votes

1 answer

143 views

Type hinting returned array shape using class attributes

I am trying to create the following type hints in Python, but I have thus far been unable to find a way to actively use my class attributes as type hints: @dataclass class MyClass: x: int y: ...

asked Aug 11 at 9:53

-3 votes

0 answers

69 views

Why does NumPy’s linspace include the endpoint by default, and how does it affect FFT frequency bins? [closed]

I noticed that numpy.linspace(start, stop, num) includes the stop value by default. When generating time arrays for FFT analysis, this sometimes gives me a slightly different frequency resolution than ...

asked Aug 10 at 23:04

0 votes

4 answers

216 views

How can I compare two pandas DataFrames with object-type columns, with a numeric tolerance?

I have two pandas dataframes: One assembled manually in Python, the other imported from a dashboard's .csv output. All columns in both dataframes are objects, and look like this: 2020 2021 2022 2023 0....

asked Aug 10 at 14:38

0 votes

0 answers

173 views

Is CMakeLists.txt critical to Essentia, and if yes, how to install? [closed]

I need to do genre recognition in Essentia, which requires Tensorflow, among other dependencies. My challenge is I do not seem to find CMakeLists in the Essentia Folder. How do I proceed from here?

asked Aug 10 at 2:48

-2 votes

0 answers

77 views

Python matrix inversion issue [closed]

I am using python to work on a project related to Leontief inversion and so on So tl;dr the I am using linalg.inv to get the inversion of the matrix, and the calculations works near perfectly for a ...

asked Aug 9 at 18:25

5 votes

1 answer

268 views

Why is the Panda's apply function so slow when iterating over an entire row, rather than a specific column? [duplicate]

My intuition when using Pandas is that, if you have to use df.apply, it would be more optimal to group all the apply operations into one call. This was further reinforced by me learning that NumPy ...

asked Aug 7 at 20:23

1 vote

0 answers

54 views

TensorFlow/Keras model accumulates system and GPU RAM during training

I am training a model using TensorFlow/Keras using TensorFlow 2.19.0/Keras 3.10.0. During training, I monitor nvidia-smi and top, and the system RAM and the GPU RAM increase during the training period....

asked Aug 6 at 17:05

0 votes

1 answer

71 views

how to create uniform nested lists and convert them in to multi dimensional arrays?

i would like to create a nested list of arbitrary depth (containing numerical values specifically) with uniform arbitrary lengths at each level and then compress it to a NumPy array of minimum ...

asked Aug 6 at 16:11

3 votes

1 answer

99 views

Lambda container - Pyarrow and numpy

I have difficulties from this: (aws-lambda-python-alpha): Failed to install numpy 2.3.0 with Python 3.11 or lower My Dockerfile: FROM public.ecr.aws/lambda/python:3.11 # Install RUN pip install '...

asked Aug 5 at 21:37

12 votes

2 answers

2k views

What's wrong with this Python assignment on signal processing - mostly Fourier series and transform

In this assignment I created the basic rect signal a[n] such that over the domain [-1000, 1000] it's 1 only at |n|<100, meaning it's an array (complex one with zero in the imaginary part) that ...

asked Aug 5 at 18:31

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4