Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
0 answers
55 views

I have tried this code where I have to make a program that asks the user how many numbers they want to be printed as mode average or median, or quitting the program. Afterwards, the user has the ...
Poppie La Riviere's user avatar
3 votes
0 answers
140 views

I am attempting to convert a set of hexcodes to a h3shape using h3.cells_to_h3shape and get the following error: Traceback (most recent call last): File "~/temp.py", line 221, in <...
BrownWolf's user avatar
0 votes
0 answers
58 views

Environment Raspberry Pi 4: 8 GB RAM Relevant Dependencies: keras 3.11.3 numpy 1.26.4 opencv-python 4.12.0.88 pillow 11.3.0 tensorflow ...
Priyanshu Jha's user avatar
2 votes
2 answers
589 views

This is a very basic example how I am trying to use langchain to invoke a llm and find the tool to use: import asyncio import json from langchain.agents import AgentExecutor, ...
hitesh's user avatar
  • 389
0 votes
1 answer
79 views

I'm participating in the curent Kaggle playground series and I decided to use a neural network for the binary classification problem because I am practicing making simple ones. I converted the target ...
Karis C. Anoruo's user avatar
3 votes
1 answer
48 views

I'm trying to fit a Structural Vector Autoregression (SVAR) model using statsmodels in Python, but I'm encountering the following error ValueError: zero-size array to reduction operation maximum which ...
PeCaDe's user avatar
  • 478
0 votes
0 answers
48 views

I'm using alphalens.utils.get_clean_factor_and_forward_returns() to compute forward returns from a factor series and price DataFrame. But I'm hitting the following error: ValueError: Length mismatch: ...
Aboriginal's user avatar
2 votes
1 answer
171 views

I'm new here so I hope that I will put all needed information As the CSV is a huge one (10Go), the URL link is in the code below if needed URL link to the data description (column type...) Delimiter ...
user30252915's user avatar
0 votes
0 answers
96 views

I'm using Solara to visualize a MESA simulation but I always get this message: ValueError: Missing required model parameter: initial_fire_positions Can someone help me figure out why it is happening?...
new_To_coding's user avatar
0 votes
0 answers
29 views

I am obtaining a ValueError regarding the input arrays and there dimension. I am trying to create a Random Forest Regression Model for price prediction using both numerical features and categorical ...
leakie's user avatar
  • 1
-1 votes
1 answer
93 views

I'm fetching a frame correctly from webcam: success, image = self.video.read() But when I try to change the mode of my frame to grayscale using the following code: gray_image = cv2.cvtColor(image, ...
Mohammed Baashar's user avatar
1 vote
1 answer
74 views

I am trying to create a dictionary from a string. In this case I have posted my sample code (sorry its not that clean, just hardcoded values), the first str1 works fine and is able generate a ...
SajS's user avatar
  • 21
-1 votes
2 answers
72 views

Here are my two dictionaries dict1 = {'AUD': 1.55453513945, 'CAD': 1.3458501245, 'EUR': 0.97729005765, 'PKR': 289.48832734625, 'USD': 1.0} dict2 = {'AUD': [1.6090702789, 1.5], 'CAD': [1.451700249, 1....
A K's user avatar
  • 1
0 votes
1 answer
27 views

I'm making a CNN and I don't know the full ins and outs of coding. When i try to add the layers, it constantly gives me a "NotImplmentedError" and a "ValueError" that says ...
Eve's user avatar
  • 9
0 votes
0 answers
16 views

I saw some unexpected behavior during a ValueError when using pandas. When incorrectly using and instead of & to provide a boolean argument to a pandas series in a loop, the traceback points at ...
ChuckLewis's user avatar
0 votes
2 answers
73 views

Python (venv) 3.12.2 from VSCode (1.96.2) within Anaconda (2.6.4) on an intel iMac, Sequoia 15.1.1. I'm working on a downloaded model (not my original work) for predicting MLB scores. One of the 17 ...
Richard C's user avatar
6 votes
0 answers
712 views

I'm attempting to enforce a schema on a prompt response from Gemini. As made clear is supported in the 'structured output' docs. For important implementation reasons, my schema contains dictionaries ...
Guy McLean's user avatar
1 vote
1 answer
1k views

I am using this set of imports import numpy as np import pandas as pd import matplotlib.pyplot as plt from chart_studio import plotly # import plotly.plotly as pl import plotly.graph_objs as go import ...
Kritarth Jaiswal's user avatar
3 votes
1 answer
91 views

I've been trying to create this machine learning tool to make predictions on the amount of orders in the next year per month but I have been getting this error: ValueError: to assemble mappings ...
Catmanallen2's user avatar
1 vote
1 answer
1k views

I'm trying to run the following simple lines of Python code: import numpy as np import matplotlib.pyplot as plt x = np.array([1, 2, 3]) y = np.array([4, 5, 6]) plt.plot(x, y) plt.show() But 'm ...
TheTomer's user avatar
  • 561
0 votes
0 answers
93 views

I've updated to python 3.12.4 and I'm getting an error on the code: test=pd.DataFrame(['2024-09-10 15:40:27+00:00','2024-09-10 18:13:50.201000+00:00']) pd.to_datetime(test[0]).dt.tz_localize(None) ...
Keith Hubbard's user avatar
0 votes
1 answer
1k views

I've been testing a code ("main.py") for image classification using a CNN model lately (whetehr a picture is a cat or a dog), and I've kept getting this error: File "c:\Users\UserPC\...
Luis Cruz's user avatar
0 votes
0 answers
260 views

I'm running a python file "data_prep.py" in which it prepares and load image data for use in a machine learning model, particularly for classification tasks involving images of different ...
Luis Cruz's user avatar
0 votes
2 answers
104 views

I am solving so called Blasius problem. I use the following code (copied from youtube lecutre https://www.youtube.com/watch?v=0L4h-hqZY2Y , timecode: 8:35): import numpy as np from scipy.integrate ...
Heat Transfer's user avatar
2 votes
0 answers
313 views

I have this numpy array 'dat' which is a 3d array of size 2048 MB and of shape (512,1024,512) when I do asizeof.asizeof(dat) from pympler, I get the error: ValueError: invalid option: reset(base=-...
simonpetre's user avatar
0 votes
2 answers
511 views

“How to replace zero values with null in BigQuery for weather data analysis?” Missing values were incorrectly entered as zeroes, and I need to change them to null values. The code I used was Update (...
Juan Landaverde's user avatar
-1 votes
1 answer
51 views

I am trying to make a chess game that can be ran on terminal and a variable that should have a value doesn't have a value and i don't know what is that cousing the problem I want to make a chess ...
mami yt 404's user avatar
0 votes
1 answer
281 views

I am working with a Pandas DataFrame that contains optimization results from HOMER software. I am encountering a ValueError indicating that the column label 'NPC' is not unique when I attempt to sort ...
Dstack's user avatar
  • 1
-2 votes
1 answer
70 views

I have two arrays in my code. One is a grid that is just filled with zero and the other is an array of characters with positions they need to be placed in on the grid. I included an image with my ...
Boltu's user avatar
  • 23
0 votes
1 answer
185 views

Firstly, I'd like to apologize if I have broken any rules since this is the first time I ask a question in this forum. So I wanted to add medaka in my Pipeline in order to polish some genome ...
DJB's user avatar
  • 1
0 votes
1 answer
95 views

I need to solve a system of equations with a certain parameter p, and then I need to find the value of p that gives me the desired results. My code looks like (in a simplified version) import numpy as ...
Gustavo Santos's user avatar
1 vote
1 answer
2k views

I'm trying to train a sequential model on the TinyImageNet dataset, using TensorFlow. TinyImageNet has 200 classes, 100k rows for training and 10k for validating. It has two columns, image and label. ...
Aven's user avatar
  • 45
2 votes
4 answers
2k views

I facing a problem when defining layers, the model summary for sequential model got error Images This problem only show when I run the code on jupyter notebook, when using google colab to run this ...
teikson tan's user avatar
0 votes
0 answers
551 views

Trying to fix a tensorflow model from an older version of tensorflow than what I have. I'm getting a ValueError that seems to be from a library version issue, but I'm really not sure how to fix that. ...
falllll's user avatar
-1 votes
1 answer
91 views

I have built a drought prediction algorithm. The inputs of this model are future year range such as Start year and end year, Month, and City. The output of this model is a bar chart, its Y axis ...
Viper Rate's user avatar
0 votes
1 answer
198 views

I'm working on a classification task using the XGBoost classifier model. My dataset contains categorical variables, my target classes ('Dropout', 'Enrolled', 'Graduate'). from xgboost import ...
Md. Ismiel Hossen Abir's user avatar
0 votes
1 answer
51 views

I have a matrix with 4 elements, where each element is a matrix of different sizes. I am trying to reshape the matrix but it keeps showing me this error: ValueError: could not broadcast input array ...
peachy's user avatar
  • 1
2 votes
0 answers
87 views

I want to create a function, that takes data instances, labels, and a target-proportion. The function should determine the proportion of classes in the given dataset/labels, and resample the data into ...
Amina Umar's user avatar
2 votes
1 answer
64 views

I'm trying to make a function that automatically takes a table from a website(Wikipedia) cleans it a bit and than displays it, everything worked well with my first 2 tables but the third one is giving ...
ale maglia's user avatar
-2 votes
2 answers
73 views

I am working on python, what is wrong with the following code: try: x, y = input("fraction: ").split("/") result = int(f"{x}* 100/{y}%") if result <= 1: ...
user25001486's user avatar
0 votes
0 answers
157 views

The question I'm asking is similar to the one I posted here a while ago: Comparing 2 Pandas dataframes row by row and performing a calculation on each row I got a very helpful answer to that question ...
Eslifkin's user avatar
0 votes
1 answer
2k views

I am trying to interpolate a 48 x 86 grid that has wind speed data (the grid being time x height) to a 71 x 81 grid (also time x height). I am trying to use the interpn function from scipy.interpolate ...
DLW9900's user avatar
0 votes
0 answers
61 views

I have a function which searches a Bank for a specific Account object. If it finds a matching account, the function replaces the Account object with None. If it finds no match, it returns. This works ...
Marshmallow's user avatar
0 votes
0 answers
122 views

I have an endless program that needs to write to daily log files. Below is basically my Message class that opens a file at startup and closes/opens a new file daily. Now I'm testing for error handling,...
Chris's user avatar
  • 495
0 votes
0 answers
45 views

I am currently working on a residual plot visualization for my perceptron. As the title states I am running into an error when calling pyplot.scatter. It seems as though the function wants n_samples ...
Cyrxs's user avatar
  • 41
1 vote
1 answer
1k views

I'm trying to write a weighted cross-entropy loss to train my model with Jax. However, I think there are some issues with my input dimension. Here are my codes: import jax.numpy as np from functools ...
WillWu's user avatar
  • 109
0 votes
0 answers
30 views

So I was coding an AI model that generates music based on text. I checked all the preprocessing functions, and they seem to work just fine. The x samples are the preprocessed text for training, and ...
progremer's user avatar
0 votes
1 answer
59 views

I am trying change object dtype to datetime # My Code: import pandas as pd # Sample data data = {'Channel_Started': ['2013-05-18T04:46:00Z', '2018-01-16T15:55:22Z', '2016-12-12T05:00:55Z', '2020-04-...
Asingh's user avatar
  • 3
-1 votes
2 answers
885 views

So i installed everything to run a jupyter notebook in Visual studio code and have tensorflow and python fully updated. However, I keep running into an error when I run one of the Kernels. ...
Yahir Mota's user avatar
1 vote
1 answer
462 views

Within the code below, please help me understand why the loss metric is not being parsed import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.impute ...
duane gadama's user avatar

1
2 3 4 5
36