Did I find the right examples for you? yes no

All Samples(46863)  |  Call(2)  |  Derive(0)  |  Import(46861)
NumPy
=====

Provides
  1. An array object of arbitrary homogeneous items
  2. Fast mathematical operations over arrays
  3. Linear Algebra, Fourier Transforms, Random Number Generation

How to use the documentation
----------------------------
Documentation is available in two forms: docstrings provided
with the code, and a loose standing reference guide, available from
`the NumPy homepage <http://www.scipy.org>`_.

We recommend exploring the docstrings using
`IPython <http://ipython.scipy.org>`_, an advanced Python shell with
TAB-completion and introspection capabilities.  See below for further
instructions.

The docstring examples assume that `numpy` has been imported as `np`::

  >>> import numpy as np

Code snippets are indicated by three greater-than signs::

  >>> x = 42
  >>> x = x + 1

Use the built-in ``help`` function to view a function's docstring::

  >>> help(np.sort)
  ... # doctest: +SKIP

For some objects, ``np.info(obj)`` may provide additional help.  This is
particularly true if you see the line "Help on ufunc object:" at the top
of the help() page.  Ufuncs are implemented in C, not Python, for speed.
The native Python help() does not know how to view their help, but our
np.info() function does.

To search for documents containing a keyword, do::

  >>> np.lookfor('keyword')
  ... # doctest: +SKIP

General-purpose documents like a glossary and help on the basic concepts
of numpy are available under the ``doc`` sub-module::

  >>> from numpy import doc
  >>> help(doc)
  ... # doctest: +SKIP

Available subpackages
---------------------
doc
    Topical documentation on broadcasting, indexing, etc.
lib
    Basic functions used by several sub-packages.
random
    Core Random Tools
linalg
    Core Linear Algebra Tools
fft
    Core FFT routines
polynomial
    Polynomial tools
testing
    Numpy testing tools
f2py
    Fortran to Python Interface Generator.
distutils
    Enhancements to distutils with support for
    Fortran compilers support and more.

Utilities
---------
test
    Run numpy unittests
show_config
    Show numpy build configuration
dual
    Overwrite certain functions with high-performance Scipy tools
matlib
    Make everything matrices.
__version__
    Numpy version string

Viewing documentation using IPython
-----------------------------------
Start IPython with the NumPy profile (``ipython -p numpy``), which will
import `numpy` under the alias `np`.  Then, use the ``cpaste`` command to
paste examples into the shell.  To see which functions are available in
`numpy`, type ``np.<TAB>`` (where ``<TAB>`` refers to the TAB key), or use
``np.*cos*?<ENTER>`` (where ``<ENTER>`` refers to the ENTER key) to narrow
down the list.  To view the docstring for a function, use
``np.cos?<ENTER>`` (to view the docstring) and ``np.cos??<ENTER>`` (to view
the source code).

Copies vs. in-place operation
-----------------------------
Most of the functions in `numpy` return a copy of the array argument
(e.g., `np.sort`).  In-place versions of these functions are often
available as array methods, i.e. ``x = np.array([1,2,3]); x.sort()``.
Exceptions to this rule are documented.

src/p/y/Pylon-0.4.4/examples/pyreto/rlopf.py   Pylon(Download)
import sys
import logging
import numpy
import scipy.io
import pylab
 
# Define a 24-hour load profile with hourly values.
p1h = numpy([0.52, 0.54, 0.52, 0.50, 0.52, 0.57, 0.60, 0.71, 0.89, 0.85, 0.88,
             0.94, 0.90, 0.88, 0.88, 0.82, 0.80, 0.78, 0.76, 0.68, 0.68, 0.68,
             0.65, 0.58])

src/p/y/pylon-HEAD/examples/pyreto/rlopf.py   pylon(Download)
import sys
import logging
import numpy
import scipy.io
import pylab
 
# Define a 24-hour load profile with hourly values.
p1h = numpy([0.52, 0.54, 0.52, 0.50, 0.52, 0.57, 0.60, 0.71, 0.89, 0.85, 0.88,
             0.94, 0.90, 0.88, 0.88, 0.82, 0.80, 0.78, 0.76, 0.68, 0.68, 0.68,
             0.65, 0.58])

src/p/y/PyAstronomy-HEAD/src/funcFit/TutorialExampleSanity.py   PyAstronomy(Download)
  def sanity_simultaneousFit(self):
    from PyAstronomy import funcFit as fuf
    import numpy
    import matplotlib.pylab as mpl
 
  def sanity_MCMCPriorExample(self):
    from PyAstronomy import funcFit as fuf
    import numpy as np
    import matplotlib.pylab as plt
    import pymc
  def sanity_autoMCMCExample1(self):
    from PyAstronomy import funcFit as fuf
    import numpy as np
    import matplotlib.pylab as plt
 
  def sanity_autoMCMCExample2(self):
    from PyAstronomy import funcFit as fuf
    import numpy as np
    import matplotlib.pylab as plt
 
  def sanity_2dCircularFit(self):
    import numpy as np
    import matplotlib.pylab as plt
    from PyAstronomy import funcFit as fuf
 

src/s/t/statsmodels-0.5.0/statsmodels/sandbox/examples/example_crossval.py   statsmodels(Download)
 
import numpy as np
 
from statsmodels.sandbox.tools import cross_val
 
    from statsmodels.iolib.table import (SimpleTable, default_txt_fmt,
                            default_latex_fmt, default_html_fmt)
    import numpy as np
 
    data = load()

src/s/t/statsmodels-HEAD/statsmodels/sandbox/examples/example_crossval.py   statsmodels(Download)
 
import numpy as np
 
from statsmodels.sandbox.tools import cross_val
 
    from statsmodels.iolib.table import (SimpleTable, default_txt_fmt,
                            default_latex_fmt, default_html_fmt)
    import numpy as np
 
    data = load()

src/m/a/matplotlib-1.3.1/examples/axes_grid/inset_locator_demo2.py   matplotlib(Download)
from mpl_toolkits.axes_grid1.inset_locator import mark_inset
 
import numpy as np
 
def get_demo_image():
    from matplotlib.cbook import get_sample_data
    import numpy as np

src/m/a/matplotlib-HEAD/examples/axes_grid/inset_locator_demo2.py   matplotlib(Download)
from mpl_toolkits.axes_grid1.inset_locator import mark_inset
 
import numpy as np
 
def get_demo_image():
    from matplotlib.cbook import get_sample_data
    import numpy as np

src/m/a/matplotlib-ancient-HEAD/examples/axes_grid/inset_locator_demo2.py   matplotlib-ancient(Download)
from mpl_toolkits.axes_grid1.inset_locator import mark_inset
 
import numpy as np
 
def get_demo_image():
    from matplotlib.cbook import get_sample_data
    import numpy as np

src/b/o/bokeh-0.4.4/examples/plotting/server/server_source_upload.py   bokeh(Download)
import numpy as np
from bokeh.plotting import *
from bokeh.objects import ServerDataSource 
import pandas as pd
output_server("remotedata")
server = session().config
import numpy as np

src/a/l/algopy-0.5.1/documentation/sphinx/examples/hessian_of_potential_function.py   algopy(Download)
#Loading the required packages
import scipy as sp
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from scipy import linalg, optimize, constants
 
import numpy
import algopy
import time

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next