The solution:

The given dataset was already an array, so I didn’t need to call .values.

Answer from T.Setso on Stack Overflow
Discussions

Error creating numpy v-stack, 'AttributeError: 'numpy.ndarray' object has no attribute 'np'
I think I'm using the wrong notation to append to the empty arrays: The best way to find out is to read the documentation https://numpy.org/doc/stable/reference/generated/numpy.append.html And yes you are. Numpy arrays don't have an append method, it's a function from the library. And there is no such thing as object.library.function(...) which is what you are doing here similarity.np.append(...) num_interactions.np.append(...) It should be similarity = np.append(similarity, values_to_append) num_interactions = np.append(num_interactions, values_to_append) And should avoid appending data to a numpy array. I'm almost sure there is much better alternative. But since you didn't explain what you are trying to do, I can't help you with that. More on reddit.com
🌐 r/learnpython
5
2
May 4, 2021
python - 'numpy.ndarray' object has no attribute 'values' - Stack Overflow
I want to shift my time series data, but getting following error: AttributeError: 'numpy.ndarray' object has no attribute 'values' Thats my Code: def create_dataset(datasets): #series = da... More on stackoverflow.com
🌐 stackoverflow.com
December 5, 2018
AttributeError: 'numpy.ndarray' object has no attribute 'numpy'
@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 ... More on discuss.pytorch.org
🌐 discuss.pytorch.org
12
0
April 9, 2019
python - 'numpy.ndarray' object has no attribute 'value' - Stack Overflow
My working code has suddenly stopped working today because of this error. Can someone please help me in solving this? style = Styler(bg_color = 'red',font_size=10) sf = StyleFrame(filtered_data) #G... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
github.com › microsoft › UST › issues › 4
AttributeError: 'numpy.ndarray' object has no attribute 'values' · Issue #4 · microsoft/UST
April 9, 2021 - AttributeError: 'numpy.ndarray' object has no attribute 'values'#4 · Copy link · airlsyn · opened · on Apr 9, 2021 · Issue body actions · training with 1 GPU, tensorflow_gpu-2.3.1, transformers-3.3.1 , an error occurred: y_pred.extend(pred.values[gpu]) in ust.py ·
Author   airlsyn
🌐
Reddit
reddit.com › r/learnpython › error creating numpy v-stack, 'attributeerror: 'numpy.ndarray' object has no attribute 'np'
r/learnpython on Reddit: Error creating numpy v-stack, 'AttributeError: 'numpy.ndarray' object has no attribute 'np'
May 4, 2021 -

Hi,

I'm trying to create a numpy v-stack and creating 3 np.array's for it, by filling them with a loop:

I get the error: 'AttributeError: 'numpy.ndarray' object has no attribute 'np' . I think I'm using the wrong notation to append to the empty arrays:

neighbor_id = [id_ for id_ in range(1, n_obs) if id_ != user_id]

neighbor_id_arr = np.array(neighbor_id)

similarity = np.array([])

num_interactions = np.array([])

# get similarity and num_interactions

for id_ in neighbor_id:

similarity.np.append(np.dot(user_item.loc[user_id],user_item.loc[id_])) #The issue is here, I think

num_interactions.np.append(user_interactions.loc[id_])

c = numpy.vstack((neighbor_id_arr, similarity,num_interactions))

Thanks!
James

🌐
YouTube
youtube.com › luke chaffey
Error "'numpy.ndarray' object has no attribute 'values'" - YouTube
python: Error "'numpy.ndarray' object has no attribute 'values'"Thanks for taking the time to learn more. In this video I'll go through your question, provid...
Published   December 15, 2022
Views   558
🌐
Itsourcecode
itsourcecode.com › home › attributeerror: numpy.ndarray object has no attribute values
Attributeerror: numpy.ndarray object has no attribute values
April 4, 2023 - This error occurs when you try to access the “values” attribute of a NumPy ndarray object, but it does not exist.
Find elsewhere
🌐
Researchdatapod
researchdatapod.com › home › how to solve python attributeerror: ‘numpy.ndarray’ has no attribute ‘values’
How to Solve Python AttributeError: 'numpy.ndarray' has no attribute 'values' - The Research Scientist Pod
May 15, 2022 - Congratulations on reading to the end of this tutorial! If you encounter this error, ensure that you check the type of object that is throwing the error using the type() method. If the object is a NumPy ndarray you can remove the values method call.
🌐
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
Originally Answered: How do you ... · · numpy arrays don’t have an append method; if you want to append values to an array, you should use the append() function of numpy....
🌐
Edureka Community
edureka.co › home › community › categories › machine learning › attributeerror numpy ndarray object has no...
AttributeError numpy ndarray object has no attribute values | Edureka Community
October 19, 2020 - Training_Set = Training_Set.values sc = MinMaxScaler(feature_range=(0, 1)) Train = sc.fit_transform ... .ndarray' object has no attribute 'values'
🌐
Stack Overflow
stackoverflow.com › questions › 64791537 › numpy-ndarray-object-has-no-attribute-value
python - 'numpy.ndarray' object has no attribute 'value' - Stack Overflow
15 Error "'numpy.ndarray' object has no attribute 'values'" 6 TypeError: 'numpy.ndarray' object is not callable when using pandas .values() 0 pandas numpy.ndarray object has no attribute · 0 how to overcome the "'numpy.ndarray' object is not callable" error?
🌐
Pythontutorials
pythontutorials.net › blog › numpyndarray-object-has-no-attribute-values
Understanding the 'numpy.ndarray' Object and the 'AttributeError: 'numpy.ndarray' object has no attribute 'values'' | PythonTutorials.net
July 5, 2025 - When working with data in Python, the `numpy.ndarray` (NumPy N-dimensional array) is a fundamental and powerful data structure. However, it's common for beginners and even experienced developers to encounter the error `'numpy.ndarray' object has no attribute 'values'`. This error typically occurs when you try to access the `values` attribute on a `numpy.ndarray` object, which doesn't exist.
🌐
Neurostars
neurostars.org › community chat
AttributeError: 'numpy.ndarray' object has no attribute 'func' - Community Chat - Neurostars
September 1, 2022 - Hello, I am working on a subject on my local pc I did preprocessing through fmriprep on docker. I used the when I wanted to run import nibabel as nib from nibabel.testing import data_path import numpy as np from …
🌐
Career Karma
careerkarma.com › blog › python › python attributeerror: ‘numpy.ndarray’ object has no attribute ‘append’ solution
Python AttributeError: 'numpy.ndarray' object has no attribute 'append' Solution
December 1, 2023 - ... The number 49 has been successfully added to the end of our list. The AttributeError: ‘numpy.ndarray’ object has no attribute ‘append’ error indicates you are using the regular Python append() method to add an item to a NumPy array.
🌐
Statology
statology.org › home › how to fix: ‘numpy.ndarray’ object has no attribute ‘append’
How to Fix: 'numpy.ndarray' object has no attribute 'append'
August 4, 2021 - To fix this error, we simply need to use np.append() instead: import numpy as np #define NumPy array x = np.array([1, 4, 4, 6, 7, 12, 13, 16, 19, 22, 23]) #append the value '25' to end of NumPy array x = np.append(x, 25) #view updated array ...