Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Array in numpy
#1
I installed modul numpy and wrote this code:

import numpy as np
height = [ 1.73, 1.68, 1.71, 1.89, 1.79]
weight = [ 65.4, 59.2, 63.6, 88.4, 68.7]

np_height = np.array(height)
np_weight = np.array(weight)

result = np_weigh / np_height ** 2
print(result)
I receive message "Attribute error: modul 'numpy' has no attribute 'array'
Don't see how is this possible.
Quote

Top Page

Messages In This Thread
Array in numpy - by Truman - Jan-03-2018, 10:42 PM
RE: Array in numpy - by snippsat - Jan-03-2018, 11:00 PM
RE: Array in numpy - by Truman - Jan-03-2018, 11:33 PM
RE: Array in numpy - by snippsat - Jan-03-2018, 11:44 PM
RE: Array in numpy - by aapurdel - May-26-2019, 03:25 AM
RE: Array in numpy - by snippsat - May-26-2019, 10:14 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  memory issue loading movie to numpy array djf123 1 60 Nov-07-2019, 06:19 AM
Last Post: ThomasL
  Numpy structured array Nitram 3 228 Sep-17-2019, 10:09 PM
Last Post: jefsummers
  numpy.copy / numpy.delete paul18fr 3 279 Jul-26-2019, 01:51 PM
Last Post: paul18fr
  AttributeError: module 'numpy' has no attribute 'array aapurdel 7 4,497 May-29-2019, 02:48 AM
Last Post: heiner55
  [split] Array in numpy aapurdel 1 291 May-25-2019, 08:05 PM
Last Post: buran
  [numpy]add a value to an array elmismo999 1 376 May-23-2019, 04:15 PM
Last Post: michalmonday
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 417 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  while creating a array using numpy.arrange, how to negate only the last 50 numbers? vicky53 1 418 Apr-06-2019, 11:52 AM
Last Post: scidam
  How to get the size of a numpy array? mcgrim 2 465 Mar-23-2019, 02:25 PM
Last Post: perfringo
  creating an empty NumPy array in Python sandeepatel 2 1,127 Jan-16-2019, 09:24 AM
Last Post: rinu

Forum Jump:


Users browsing this thread: 1 Guest(s)