# Recent questions tagged numpy

Problems I am trying to update selected datetime64 values in a pandas data frame using the loc method to select rows satisfying a condition. However, instead of assigning the new date-time value it results in NaT. Here is a simplification of my code that shows the problem: ... as the second element in the new_date column. Any ideas on how this should be done or why this is not working as intended?
Problem: I have currently started learning about using the pandas in ipython notebook: import pandas as pd But I have encountered the below error on my above line of code: AttributeError  Traceback (most recent call last) <ipython-input-17-c7ecb2b0a99d> in <module>() ----> 1 from ... ' I have no knowledge on how to fix the above error, what is a problem here? My python's version is currently 3.6
1 vote
Problem: Hello Kodlogs, I am currently working with the NumPy in Python. Already solved some geometrical problems. Now, I am wondering, if I can make a Python program to create a line of best fit for a straight line! I would appreciate it if you could help me in this regard. Note: I am using Python-3.7
1 vote
Problem: Hello Kodlogs, I am a new student in Python. Previously I used to develop programs in Java. I just installed a fresh Python on my machine. A lot of things to know and learn in Python, and for that, I joined this forum. I found the forum very helpful with a lot of ... same thing, but I want to do it in a NumPy program. How do you do it? Could you please share me the tip? Thanks in advance.
1 vote
Problem: Hello Kodlogs, Being a newbie I have a question regarding NumPy in Python. I want to square an array&rsquo;s value using the NumPy. Anyway, I can make such a program using normal iteration over an array. I&rsquo;ve googled the problem and found some solution where people ... square(list): return [i ** 2 for i in list] I am eagerly waiting for your answers. Thanks for your kind concern.
1 vote
Problem: Hello Kodlogs, I was trying to perform some mathematical operation like finding minimum, maximum, average e.t.c. from an array. I can do it using the simple method; adding all the all elements and then divide it by the number of elements. I want to make a ... with less line of codes. Could any of you please give me an example of that type of pram? I will appreciate your help. Thanks.
1 vote
Problem: Yesterday I uninstalled Anaconda and shut down my computer. Right now, I&rsquo;ve freshly installed the Anaconda again on my laptop to run a project. Suddenly, I am facing an ImportError to run a python project. ImportError: Missing required dependencies ['numpy'] ... but it produces the same error again and again. Do you have any clear idea about this problem and how to solve it?
Problem: Recently I have joined new project on python and numpy. My below code is returning me below error: Attributeerror: 'numpy.ndarray' object has no attribute 'append' . Please find my code below for the reference: class1 = np.array([]) #It creates 2 ... to print my results in the scatter graphic with the two colors where I can try to identify the visually the class1 and class2 elements.
Problem: I wrote the following code in python using numpy. But it gives me some error message. The code I wrote is: import numpy as np arrayone = np.array(['Human', 'Birds', 'Groots', 'Oats']) arraytwo = np.array(['Beach', 'Toast']) arraythree ... concatenate TypeError: only integer scalar arrays can be converted to a scalar index Can anyone sort out this error and solve this. Thanks in advance.
1 vote
Problem : I am beginner to Ancaconda3 and Tensorflow. I have also recently installed Ancaconda3 and Tensorflow. But if I try to import the Tensorflow in the python shell then I often face the below error: ModuleNotFoundError: No module named 'numpy.core._multiarray_umath ... also installed on my box and it can be very successfully imported in the python. Please note currently I am using Windows10.
1 vote