-1

I am struggling to use basic NumPy functions in my Python programme on Enthought's IPython, such as 'pi' and 'logspace'

It also says that the term 'plot' is undefined - has it changed?

Thanks so much

Jameister
  • 13
  • 1

1 Answers1

4

Had you imported numpy and matplotlib? If I had to guess, you used to start ipython with the --pylab flag. That flag is the destroyer of minds and hearts, and was recently deprecated.

A more merciful approach would be explicit imports that maintain namespaces, i.e.,

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

However, if you want the mayhem to continue, you can execute from pylab import * at the top of your notebook.

Paul H
  • 65,268
  • 20
  • 159
  • 136
  • forgive me, I am a beginner programmer but I'm slowly getting the hang of things - thanks for your help! – Jameister Nov 04 '14 at 13:58