[Numpy-discussion] Function returns nothing!

Scott Sinclair scott.sinclair.za@gmail....
Mon Jul 12 06:40:12 CDT 2010


>On 12 July 2010 11:45, allan oware <lumtegis@gmail.com> wrote:
> Hi All!
>
> def height_diffs():
>     h = []
>     i = 0
>     while True:
>         x = raw_input("Enter height difference ")
>         if x == 'q':
>             break
>         else:
>             h.append(x)
>             i = i + 1
>
>     m = asarray(h,dtype=float)
>
>     return m
>
>
> why does return statement return nothing?

It works for me. Can you explain what you mean by "return nothing"?

Cheers,
Scott


More information about the NumPy-Discussion mailing list