I think I've figured it out. The .remove() method is a list method, not an ndarray method. So by using array.tolist() I can then apply the .remove() method and get the required result.

Answer from berkelem on Stack Overflow
🌐
Quora
quora.com › Why-do-I-get-numpy-ndarray-object-has-no-attribute-append-error
Why do I get “numpy.ndarray object has no attribute append error”? - Quora
In NumPy, we call its shape (2, 3, 5). The shape of an array is fixed. ... [3] ndarrays cannot change in size and shape. (You can, however, change values inside an ndarray, provided the replacements are of the same type.) In Python, an attribute is anything that follows a dot after the object, which include data attributes (arr.shape) or methods (arr.flatten()).
Discussions

python - 'numpy.ndarray' object has no attribute 'delete' - Stack Overflow
This yields AttributeError: numpy.ndarray object has no attribute delete What could be the error? I want to remove matching elements from contour. More on stackoverflow.com
🌐 stackoverflow.com
python - AttributeError: 'numpy.ndarray' object has no attribute 'columns' - Stack Overflow
I'm trying to create a function to remove the features that are highly correlated with each other. However, I am getting the error ''AttributeError: 'numpy.ndarray' object has no attribute 'column... More on stackoverflow.com
🌐 stackoverflow.com
scikit learn - AttributeError: 'numpy.ndarray' object has no attribute 'columns' - Data Science Stack Exchange
import numpy as np import pandas as pd from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.feature_selection import SelectFromModel... More on datascience.stackexchange.com
🌐 datascience.stackexchange.com
June 21, 2019
AttributeError: 'numpy.ndarray' object has no attribute 'pop'
A Keras port of Single Shot MultiBox Detector. Contribute to pierluigiferrari/ssd_keras development by creating an account on GitHub. More on github.com
🌐 github.com
7
January 10, 2018
🌐
freeCodeCamp
forum.freecodecamp.org › python
Medical Data Visualizer AttributeError: 'numpy.ndarray' object has no attribute - Python - The freeCodeCamp Forum
May 12, 2023 - I completed the project on google colab and everything seems to be working once I copy it over to replit. The charts seem to look good. However, I’m getting the following 2 errors on test: =============================…
🌐
Researchdatapod
researchdatapod.com › home › how to solve python attributeerror: ‘numpy.ndarray’ object has no attribute ‘remove’
How to Solve Python AttributeError: 'numpy.ndarray' object has no attribute 'remove' - The Research Scientist Pod
May 16, 2022 - If you encounter this error, you can get the indices of the values you want to remove using numpy.where then use numpy.delete to remove those values. Alternatively, you could convert the array to a list and use the remove method.
🌐
TheLinuxCode
thelinuxcode.com › home › resolving the numpy "attributeerror: ‘numpy.ndarray‘ object has no attribute ‘remove‘"
Resolving the NumPy "AttributeError: ‘numpy.ndarray‘ object has no attribute ‘remove‘" – TheLinuxCode
December 27, 2023 - arr = np.array([1, 2, 3]) new_arr = np.delete(arr, 1) # Does not alter arr · If you want an in-place change, assign back to the variable: arr = np.array([1, 2, 3]) arr = np.delete(arr, 1) # Updates arr · Finally, while deleting unwanted elements is useful, also consider if NumPy masking or slicing would better serve your use case without data movement. I hope these removing and troubleshooting tips help you banish that nasty "AttributeError: ‘numpy.ndarray‘ object has no attribute ‘remove‘" from your NumPy code for good!
🌐
Markaicode
markaicode.com › home › python › fix 'numpy.ndarray object has no remove attribute' error (3 working solutions)
Fix 'numpy.ndarray Object Has No remove Attribute' Error (3 Working Solutions) | Markaicode
March 3, 2026 - The problem: You want to remove elements by their value, not position · My solution: Use boolean masks - this changed how I think about NumPy
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 48783749 › numpy-ndarray-object-has-no-attribute-delete
python - 'numpy.ndarray' object has no attribute 'delete' - Stack Overflow
Instead, you have to use numpy.delete(contours0[0], index) where index is the position of i ... One quality every engineering manager should have? Empathy. ... Join us for our first community-wide AMA (Ask Me Anything) with Stack... bigbird and Frog have joined us as Community Managers ... Is it better to redirect users who attempt to perform actions they can't yet... 362 How to remove specific elements in a numpy array
🌐
Linux Hint
linuxhint.com › fix-attributeerror-numpy-ndarray-object-no-attribute-remove
How to Fix the AttributeError – _numpy.ndarray_ object has ...
Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
GitHub
github.com › pierluigiferrari › ssd_keras › issues › 44
AttributeError: 'numpy.ndarray' object has no attribute 'pop' · ...
January 10, 2018 - /usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.pyc in wrapper(*args, **kwargs) 85 warnings.warn('Update your `' + object_name + 86 '` call to the Keras 2 API: ' + signature, stacklevel=2) ---> 87 return func(*args, **kwargs) 88 wrapper._original_function = func 89 return wrapper /usr/local/lib/python2.7/dist-packages/keras/engine/training.pyc in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch) 2113 batch_index = 0 2114 while steps_don
Author   nealzGu
🌐
GitHub
github.com › waylandy › phosformer › issues › 1
'numpy.ndarray' object has no attribute 'numpy'. · Issue #1 · waylandy/phosformer
November 16, 2023 - Traceback (most recent call last): File "/Users/joshuasacher/phosformer/wip1_S234.py", line 17, in <module> predictions = Phosformer.predict_many( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/joshuasacher/phosformer/Phosformer/modules.py", line 204, in predict_many return np.array([i['pred'] for i in batch_job(kinases, peptides, **kwargs)]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/joshuasacher/phosformer/Phosformer/modules.py", line 204, in <listcomp> return np.array([i['pred'] for i in batch_job(kinases, peptides, **kwargs)]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/joshuasacher/phosformer/Phosformer/modules.py", line 96, in batch_job pred = softmax(result['logits'].cpu(), axis=1)[:,1].numpy() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'numpy.ndarray' object has no attribute 'numpy'.
Author   jrsacher
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-fix-numpy-ndarray-object-has-no-attribute-index
How to Fix: ‘numpy.ndarray’ object has no attribute ‘index’ - GeeksforGeeks
November 28, 2021 - This error arises because numpy's float attribute has been deprecated and removed in favor of using standard Python types. In this article, we will learn how to fix "AttributeError: m ... When working with NumPy we might encounter the error ...
🌐
Reddit
reddit.com › r/learnpython › attributeerror: 'numpy.ndarray' object has no attribute 'pop'
r/learnpython on Reddit: AttributeError: 'numpy.ndarray' object has no attribute 'pop'
November 28, 2022 -

Write a function to calculate accumulated GPA (omit grade <5).

def gpa_of_pass(marks, credits):
    gpa_list=[]
    for i in range(len(marks)):
        for j in range(len(marks[i])):
            if marks[i][j] < 5:
                marks=marks[i].pop(j)
    for i in marks:
        for j in i:
            gpa_list.append(np.dot(i,credits)/sum(credits))
    return gpa_list

marks = np.array([
    [8.0, 9.0, 10.0],
    [4.0, 9.0, 8.0],
    [8.0, 3.0, 8.0],
    [10.0, 9.0, 5.0],
    [9.0, 9.0, 4.0]
])

credits = np.array([2, 2, 1])
gpa_of_pass(marks, credits)

I ran a for loop to remove the grade <5 before calculating the GPA but I got the error in the title. Would you please have any suggestions? Thank you so much!

🌐
PyTorch Forums
discuss.pytorch.org › vision
AttributeError: 'numpy.ndarray' object has no attribute 'numpy' - vision - PyTorch Forums
April 9, 2019 - @ptrblck, Hi! I’m trying to visualize the adversarial images generated by this script: https://pytorch.org/tutorials/beginner/fgsm_tutorial.html This tutorial is used for the mnist data. Now I want to use for other data which is trained using the inception_v1 architecture, below is the gist ...
🌐
Reddit
reddit.com › r/learnpython › usage of np.delete
r/learnpython on Reddit: usage of np.delete
April 29, 2021 -

Hey lads n gals

I am working on an assignment, where we are doing a grading system for students on the -3 to 12 scale...

here is the code so far:

import numpy as np

from RoundGrade import roundGrade

def computeFinalGrade(grades):

if -3 in grades:

return -3

if len(grades)==1:

return grades[0]

if len(grades)>=2:

grademin=grades.delete(min(grades))

average=np.mean(grademin)

return roundGrade(average)

grades=np.array([6,9,2,5,2])

print(computeFinalGrade(grades))

however this gives me the error messege:

'numpy.ndarray' object has no attribute 'delete'

i have tried converting the array to a list, but it doesn't help

thanks <3