Skip to main content

Questions tagged [numpy]

NumPy is one of the many modules in Python that adds support of large multidimensional arrays and matrixes, along with a large library of high-level mathematical functions for operations with these arrays.

0 votes
0 answers
9 views

Python - errors when calling cv2.ml.TrainData_create(): - responses data type = 19 is not supported - Expected Ptr<cv::UMat> for argument 'responses'

I am following the following tutorial: https://www.opencvhelp.org/tutorials/deep-learning/training-models/ Following the instructions using the Caltech-101 dataset, I preprocessed the images and ...
user279043's user avatar
-2 votes
0 answers
8 views

i am in the process of using pandasai, but keep getting this error from pandas.compat import is_numpy_dev as _is_numpy_dev

from pandas.compat import is_numpy_dev as _is_numpy_dev # pyright: ignore # noqa:F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ i am running numpy version 2 python version 3.11 pandas 1....
user3537234's user avatar
-4 votes
1 answer
46 views

Python numpy, math: Any way raising a negative number to a decimal power without resulting in Nan?

I am getting errors trying to raise a negative number to a decimal power. For example, I want to calculate this (-2)^(4.8) which should result in valid, real number output (27.85 from my TI-89). I ...
westcoasting__'s user avatar
0 votes
0 answers
14 views

numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject error

I am trying to import pmdarima but it gives the error ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject I uninstalled numpy ...
Eyram's user avatar
  • 1
0 votes
1 answer
39 views

Issue with Custom Rounding Function in Python Pandas

I have implemented a custom rounding function in Python using Pandas, but it's not producing the expected results in certain cases. It basically should always round down to the nearest step.Here's the ...
arrabattapp man's user avatar
-3 votes
0 answers
18 views

how can I compute the striking force of a football player using python [closed]

in a football match between England and Spain Julius Fueke needs a decisive goal, write a Python program that can compute the striking force of each of the players i tried using the import numpy but ...
yagi's user avatar
  • 1
0 votes
0 answers
16 views

How to "average out" multiple curves with sklearn Lasso regression?

The lecture slides here: https://www.cs.cmu.edu/~ggordon/10725-F12/slides/09-acceleration.pdf on page show multiple lines on a convergence plot apparently "averaged out" with Lasso ...
ufghd34's user avatar
  • 151
1 vote
1 answer
54 views

Generate n random 2D points within a valid region

I want to generate a fixed number of random-uniformly distributed xy points within a valid mask. The generated points should be continuous, i.e. can be "between pixels". I'm looking for an ...
Toni's user avatar
  • 33
1 vote
1 answer
19 views

How to extract graph edges in a specific order from networkx?

I am trying to find the shortest path that passes through a set of points that are pretty much aligned. This needs to work in all directions, so I can't just sort them by x or y values. The solution I ...
user19109076's user avatar
0 votes
1 answer
44 views

image to ascii art with edge detection using the sobel filter in python using pygame not rotated correctly

I have to layers of ascii art, one for the sobel filter, one for the general ascii art. I then overlap then and, because the sobel filter is initially only 0, using a simpe filter. The code works for ...
noschXL's user avatar
  • 17
-3 votes
0 answers
28 views

Neural Network cost not changing

I can't seem to figure out why my cost print function is giving me the same cost every time and my weights and biases are not changing. Help would be greatly appreciated and I have tried putting it ...
Damienwin's user avatar
-1 votes
0 answers
21 views

A problem with Importing Matplotlib (A module that was compiled using NumPy 1.x) [duplicate]

When I'm trying to import matplotlib by the following standard code: import matplotlib.pyplot as plt I'm getting the following error massage: A module that was compiled using NumPy 1.x cannot be run ...
Elad's user avatar
  • 19
2 votes
1 answer
41 views

Why the addion of float32 array and float64 scalar is float32 array in Numpy?

If one add float32 and float64 scalars, the result is float64: float32 is promoted to float64. However, I find that, adding a float32 array and a float64 scalar, the result is a float32 array, rather ...
Ma Ming's user avatar
  • 33
0 votes
0 answers
20 views

Numpy dependency errors while installing the RPM Package

I've created a RPM Package for a python application using setuptools and rpmbuild, the application need few modules like numpy,flask..etc,I've install all the modules in the package itself. but while ...
madduri charan's user avatar
0 votes
0 answers
35 views

A property of Python class returns an empty numpy array with pybind11

I adopted a project that was abandoned by it's original creator on GH: pybind11 bindings for whispercpp. I had to update Python version from 3.8 to 3.11.8 in CI and discovered that some of the test ...
WintermuteAI's user avatar

15 30 50 per page
1
2 3 4 5
7631