[Tutor] New to Python - simple question

Oscar Benjamin oscar.j.benjamin at gmail.com
Tue Nov 20 03:24:06 CET 2012


On 18 November 2012 14:07, Unaiza Ahsan <unaiza.ahsan at gmail.com> wrote:
> Hi all,
>
>
> The function histogram is supposed to come from the numpy module; at
>
> least that's the case on my computer (I have numpy 1.6.2 for Python
> 2.7):
>
>>>> from numpy import *
>
>>>> histogram
> <function histogram at 0x10b0c0ed8>
>
> Maybe something is wrong with Unaiza's version of numpy.
>
>
> Kal
>
> Yes it's supposed to come from numpy. In imtools.py, the following line is
> there:
> from numpy import *
>
> But I'm still getting the error. Since I'm a beginner in Python, I'm not at
> all sure what's wrong here.

I've checked and I also have a histogram function in my numpy module
so I don't understand what the problem is.

What would make it possible for us to help you, Unaiza, is if you
provide a short piece of code that demonstrates the problem you are
having. Perhaps you could just post the whole of the code you are
using but if you are able to shorten it while still demonstrating the
problem then that is better.

Reading the link below will help you to seek help from others. In
particular I don't have enough information to check if your code would
work on my computer or not, so it's difficult for me to help you right
now:
http://sscce.org/

The ideal thing would be if you could make a single Python script that
shows the problem you are having. If that is not possible then please
provide complete code and also as much as possible information about
how you are running your script, what folder it's in and what other
modules are in the folder and so on (more information is usually
better).


Oscar


More information about the Tutor mailing list