Python: module AIGO.gui.grid

AIGO.gui.grid | index /home/dpm/projects/AIGO-0.1.0/AIGO/gui/grid.py

`grid.py
AIGO is a python library for
the Analysis and Inter-comparison of Gene Ontology functional annotations.
see (http://code.google.com/p/aigo).
Created by Michael Defoin-Platel on 21/02/2010.
Copyright (c) 2010. All rights reserved.
AIGO is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.`

Modules
`` |  |
numpy.add_newdocs matplotlib.cbook numpy.core.defchararray matplotlib.cm numpy.ctypeslib numpy.lib.scimath | numpy.fft.fftpack numpy.fft.fftpack_lite numpy.fft.helper numpy.linalg.info numpy.linalg.lapack_lite numpy.linalg.linalg | numpy.ma math matplotlib matplotlib.mlab matplotlib.mpl numpy | matplotlib.pyplot numpy.core.records sys warnings wx

Classes
`` |  | wx.grid.Grid(wx._windows.ScrolledWindow) StatisticsGrid wx.grid.PyGridTableBase(wx.grid.GridTableBase) StatisticsTable
class StatisticsGrid(wx.grid.Grid)
`` |  | Method resolution order: StatisticsGrid wx.grid.Grid wx._windows.ScrolledWindow wx._windows.Panel wx._core.Window wx._core.EvtHandler wx._core.Object __builtin__.object Methods defined here: UpdateData(self, aspect, allFA, allStatistics, colLabels, rowLabels) __init__(self, parent, *args, **kwargs) Methods inherited from wx.grid.Grid: AppendCols(*args, **kwargs) `AppendCols(self, int numCols=1, bool updateLabels=True) -> bool` AppendRows(*args, **kwargs) `AppendRows(self, int numRows=1, bool updateLabels=True) -> bool` AutoSize(*args, **kwargs) `AutoSize(self)` AutoSizeColLabelSize(*args, **kwargs) `AutoSizeColLabelSize(self, int col)` AutoSizeColumn(*args, **kwargs) `AutoSizeColumn(self, int col, bool setAsMin=True)` AutoSizeColumns(*args, **kwargs) `AutoSizeColumns(self, bool setAsMin=True)` AutoSizeRow(*args, **kwargs) `AutoSizeRow(self, int row, bool setAsMin=True)` AutoSizeRowLabelSize(*args, **kwargs) `AutoSizeRowLabelSize(self, int row)` AutoSizeRows(*args, **kwargs) `AutoSizeRows(self, bool setAsMin=True)` BeginBatch(*args, **kwargs) `BeginBatch(self)` BlockToDeviceRect(*args, **kwargs) `BlockToDeviceRect(self, GridCellCoords topLeft, GridCellCoords bottomRight) -> Rect` CalcCellsExposed(*args, **kwargs) `CalcCellsExposed(self, Region reg) -> wxGridCellCoordsArray` CalcColLabelsExposed(*args, **kwargs) `CalcColLabelsExposed(self, Region reg) -> wxArrayInt` CalcRowLabelsExposed(*args, **kwargs) `CalcRowLabelsExposed(self, Region reg) -> wxArrayInt` CanDragCell(*args, **kwargs) `CanDragCell(self) -> bool` CanDragColMove(*args, **kwargs) `CanDragColMove(self) -> bool` CanDragColSize(*args, **kwargs) `CanDragColSize(self) -> bool` CanDragGridSize(*args, **kwargs) `CanDragGridSize(self) -> bool` CanDragRowSize(*args, **kwargs) `CanDragRowSize(self) -> bool` CanEnableCellControl(*args, **kwargs) `CanEnableCellControl(self) -> bool` CellToRect(*args, **kwargs) `CellToRect(self, int row, int col) -> Rect` ClearGrid(*args, **kwargs) `ClearGrid(self)` ClearSelection(*args, **kwargs) `ClearSelection(self)` Create(*args, **kwargs) `Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=WANTS_CHARS, String name=wxPyGridNameStr) -> bool` CreateGrid(*args, **kwargs) `CreateGrid(self, int numRows, int numCols, WXGRIDSELECTIONMODES selmode=wxGridSelectCells) -> bool` DeleteCols(*args, **kwargs) `DeleteCols(self, int pos=0, int numCols=1, bool updateLabels=True) -> bool` DeleteRows(*args, **kwargs) `DeleteRows(self, int pos=0, int numRows=1, bool updateLabels=True) -> bool` DeselectCell(*args, **kwargs) `DeselectCell(self, int row, int col)` DeselectCol(*args, **kwargs) `DeselectCol(self, int col)` DeselectRow(*args, **kwargs) `DeselectRow(self, int row)` DisableCellEditControl(*args, **kwargs) `DisableCellEditControl(self)` DisableDragCell(*args, **kwargs) `DisableDragCell(self)` DisableDragColMove(*args, **kwargs) `DisableDragColMove(self)` DisableDragColSize(*args, **kwargs) `DisableDragColSize(self)` DisableDragGridSize(*args, **kwargs) `DisableDragGridSize(self)` DisableDragRowSize(*args, **kwargs) `DisableDragRowSize(self)` DrawCellHighlight(*args, **kwargs) `DrawCellHighlight(self, DC dc, GridCellAttr attr)` DrawColLabel(*args, **kwargs) `DrawColLabel(self, DC dc, int col)` DrawColLabels(*args, **kwargs) `DrawColLabels(self, DC dc, wxArrayInt cols)` DrawRowLabel(*args, **kwargs) `DrawRowLabel(self, DC dc, int row)` DrawRowLabels(*args, **kwargs) `DrawRowLabels(self, DC dc, wxArrayInt rows)` DrawTextRectangle(*args, **kwargs) `DrawTextRectangle(self, DC dc, String ?, Rect ?, int horizontalAlignment=LEFT, int verticalAlignment=TOP, int textOrientation=HORIZONTAL)` EnableCellEditControl(*args, **kwargs) `EnableCellEditControl(self, bool enable=True)` EnableDragCell(*args, **kwargs) `EnableDragCell(self, bool enable=True)` EnableDragColMove(*args, **kwargs) `EnableDragColMove(self, bool enable=True)` EnableDragColSize(*args, **kwargs) `EnableDragColSize(self, bool enable=True)` EnableDragGridSize(*args, **kwargs) `EnableDragGridSize(self, bool enable=True)` EnableDragRowSize(*args, **kwargs) `EnableDragRowSize(self, bool enable=True)` EnableEditing(*args, **kwargs) `EnableEditing(self, bool edit)` EnableGridLines(*args, **kwargs) `EnableGridLines(self, bool enable=True)` EndBatch(*args, **kwargs) `EndBatch(self)` ForceRefresh(*args, **kwargs) `ForceRefresh(self)` GetBatchCount(*args, **kwargs) `GetBatchCount(self) -> int` GetCellAlignment(*args, **kwargs) `GetCellAlignment(int row, int col) -> (horiz, vert)` GetCellBackgroundColour(*args, **kwargs) `GetCellBackgroundColour(self, int row, int col) -> Colour` GetCellEditor(*args, **kwargs) `GetCellEditor(self, int row, int col) -> GridCellEditor` GetCellFont(*args, **kwargs) `GetCellFont(self, int row, int col) -> Font` GetCellHighlightColour(*args, **kwargs) `GetCellHighlightColour(self) -> Colour` GetCellHighlightPenWidth(*args, **kwargs) `GetCellHighlightPenWidth(self) -> int` GetCellHighlightROPenWidth(*args, **kwargs) `GetCellHighlightROPenWidth(self) -> int` GetCellOverflow(*args, **kwargs) `GetCellOverflow(self, int row, int col) -> bool` GetCellRenderer(*args, **kwargs) `GetCellRenderer(self, int row, int col) -> GridCellRenderer` GetCellSize(*args, **kwargs) `GetCellSize(int row, int col) -> (num_rows, num_cols)` GetCellTextColour(*args, **kwargs) `GetCellTextColour(self, int row, int col) -> Colour` GetCellValue(*args, **kwargs) `GetCellValue(self, int row, int col) -> String` GetColAt(*args, **kwargs) `GetColAt(self, int colPos) -> int` GetColGridLinePen(*args, **kwargs) `GetColGridLinePen(self, int col) -> wxPen` GetColLabelAlignment(*args, **kwargs) `GetColLabelAlignment() -> (horiz, vert)` GetColLabelSize(*args, **kwargs) `GetColLabelSize(self) -> int` GetColLabelTextOrientation(*args, **kwargs) `GetColLabelTextOrientation(self) -> int` GetColLabelValue(*args, **kwargs) `GetColLabelValue(self, int col) -> String` GetColMinimalAcceptableWidth(*args, **kwargs) `GetColMinimalAcceptableWidth(self) -> int` GetColPos(*args, **kwargs) `GetColPos(self, int colID) -> int` GetColSize(*args, **kwargs) `GetColSize(self, int col) -> int` GetDefaultCellAlignment(*args, **kwargs) `GetDefaultCellAlignment() -> (horiz, vert)` GetDefaultCellBackgroundColour(*args, **kwargs) `GetDefaultCellBackgroundColour(self) -> Colour` GetDefaultCellFont(*args, **kwargs) `GetDefaultCellFont(self) -> Font` GetDefaultCellOverflow(*args, **kwargs) `GetDefaultCellOverflow(self) -> bool` GetDefaultCellTextColour(*args, **kwargs) `GetDefaultCellTextColour(self) -> Colour` GetDefaultColLabelSize(*args, **kwargs) `GetDefaultColLabelSize(self) -> int` GetDefaultColSize(*args, **kwargs) `GetDefaultColSize(self) -> int` GetDefaultEditor(*args, **kwargs) `GetDefaultEditor(self) -> GridCellEditor` GetDefaultEditorForCell(*args, **kwargs) `GetDefaultEditorForCell(self, int row, int col) -> GridCellEditor` GetDefaultEditorForType(*args, **kwargs) `GetDefaultEditorForType(self, String typeName) -> GridCellEditor` GetDefaultGridLinePen(*args, **kwargs) `GetDefaultGridLinePen(self) -> wxPen` GetDefaultRenderer(*args, **kwargs) `GetDefaultRenderer(self) -> GridCellRenderer` GetDefaultRendererForCell(*args, **kwargs) `GetDefaultRendererForCell(self, int row, int col) -> GridCellRenderer` GetDefaultRendererForType(*args, **kwargs) `GetDefaultRendererForType(self, String typeName) -> GridCellRenderer` GetDefaultRowLabelSize(*args, **kwargs) `GetDefaultRowLabelSize(self) -> int` GetDefaultRowSize(*args, **kwargs) `GetDefaultRowSize(self) -> int` GetGridColLabelWindow(*args, **kwargs) `GetGridColLabelWindow(self) -> Window` GetGridCornerLabelWindow(*args, **kwargs) `GetGridCornerLabelWindow(self) -> Window` GetGridCursorCol(*args, **kwargs) `GetGridCursorCol(self) -> int` GetGridCursorRow(*args, **kwargs) `GetGridCursorRow(self) -> int` GetGridLineColour(*args, **kwargs) `GetGridLineColour(self) -> Colour` GetGridRowLabelWindow(*args, **kwargs) `GetGridRowLabelWindow(self) -> Window` GetGridWindow(*args, **kwargs) `GetGridWindow(self) -> Window` GetLabelBackgroundColour(*args, **kwargs) `GetLabelBackgroundColour(self) -> Colour` GetLabelFont(*args, **kwargs) `GetLabelFont(self) -> Font` GetLabelTextColour(*args, **kwargs) `GetLabelTextColour(self) -> Colour` GetNumberCols(*args, **kwargs) `GetNumberCols(self) -> int` GetNumberRows(*args, **kwargs) `GetNumberRows(self) -> int` GetOrCreateCellAttr(*args, **kwargs) `GetOrCreateCellAttr(self, int row, int col) -> GridCellAttr` GetRowGridLinePen(*args, **kwargs) `GetRowGridLinePen(self, int row) -> wxPen` GetRowLabelAlignment(*args, **kwargs) `GetRowLabelAlignment() -> (horiz, vert)` GetRowLabelSize(*args, **kwargs) `GetRowLabelSize(self) -> int` GetRowLabelValue(*args, **kwargs) `GetRowLabelValue(self, int row) -> String` GetRowMinimalAcceptableHeight(*args, **kwargs) `GetRowMinimalAcceptableHeight(self) -> int` GetRowSize(*args, **kwargs) `GetRowSize(self, int row) -> int` GetScrollLineX(*args, **kwargs) `GetScrollLineX(self) -> int` GetScrollLineY(*args, **kwargs) `GetScrollLineY(self) -> int` GetScrollX(*args, **kwargs) `GetScrollX(self, int x) -> int` GetScrollY(*args, **kwargs) `GetScrollY(self, int y) -> int` GetSelectedCells(*args, **kwargs) `GetSelectedCells(self) -> wxGridCellCoordsArray` GetSelectedCols(*args, **kwargs) `GetSelectedCols(self) -> wxArrayInt` GetSelectedRows(*args, **kwargs) `GetSelectedRows(self) -> wxArrayInt` GetSelectionBackground(*args, **kwargs) `GetSelectionBackground(self) -> Colour` GetSelectionBlockBottomRight(*args, **kwargs) `GetSelectionBlockBottomRight(self) -> wxGridCellCoordsArray` GetSelectionBlockTopLeft(*args, **kwargs) `GetSelectionBlockTopLeft(self) -> wxGridCellCoordsArray` GetSelectionForeground(*args, **kwargs) `GetSelectionForeground(self) -> Colour` GetSelectionMode(*args, **kwargs) `GetSelectionMode(self) -> WXGRIDSELECTIONMODES` GetTable(*args, **kwargs) `GetTable(self) -> GridTableBase` GetTextBoxSize(*args, **kwargs) `GetTextBoxSize(DC dc, list lines) -> (width, height)` GridLinesEnabled(*args, **kwargs) `GridLinesEnabled(self) -> bool` HideCellEditControl(*args, **kwargs) `HideCellEditControl(self)` InsertCols(*args, **kwargs) `InsertCols(self, int pos=0, int numCols=1, bool updateLabels=True) -> bool` InsertRows(*args, **kwargs) `InsertRows(self, int pos=0, int numRows=1, bool updateLabels=True) -> bool` IsCellEditControlEnabled(*args, **kwargs) `IsCellEditControlEnabled(self) -> bool` IsCellEditControlShown(*args, **kwargs) `IsCellEditControlShown(self) -> bool` IsCurrentCellReadOnly(*args, **kwargs) `IsCurrentCellReadOnly(self) -> bool` IsEditable(*args, **kwargs) `IsEditable(self) -> bool` IsInSelection(*args, **kwargs) `IsInSelection(self, int row, int col) -> bool` IsReadOnly(*args, **kwargs) `IsReadOnly(self, int row, int col) -> bool` IsSelection(*args, **kwargs) `IsSelection(self) -> bool` IsVisible(*args, **kwargs) `IsVisible(self, int row, int col, bool wholeCellVisible=True) -> bool` MakeCellVisible(*args, **kwargs) `MakeCellVisible(self, int row, int col)` MoveCursorDown(*args, **kwargs) `MoveCursorDown(self, bool expandSelection) -> bool` MoveCursorDownBlock(*args, **kwargs) `MoveCursorDownBlock(self, bool expandSelection) -> bool` MoveCursorLeft(*args, **kwargs) `MoveCursorLeft(self, bool expandSelection) -> bool` MoveCursorLeftBlock(*args, **kwargs) `MoveCursorLeftBlock(self, bool expandSelection) -> bool` MoveCursorRight(*args, **kwargs) `MoveCursorRight(self, bool expandSelection) -> bool` MoveCursorRightBlock(*args, **kwargs) `MoveCursorRightBlock(self, bool expandSelection) -> bool` MoveCursorUp(*args, **kwargs) `MoveCursorUp(self, bool expandSelection) -> bool` MoveCursorUpBlock(*args, **kwargs) `MoveCursorUpBlock(self, bool expandSelection) -> bool` MovePageDown(*args, **kwargs) `MovePageDown(self) -> bool` MovePageUp(*args, **kwargs) `MovePageUp(self) -> bool` ProcessTableMessage(*args, **kwargs) `ProcessTableMessage(self, GridTableMessage ?) -> bool` RegisterDataType(*args, **kwargs) `RegisterDataType(self, String typeName, GridCellRenderer renderer, GridCellEditor editor)` SaveEditControlValue(*args, **kwargs) `SaveEditControlValue(self)` SelectAll(*args, **kwargs) `SelectAll(self)` SelectBlock(*args, **kwargs) `SelectBlock(self, int topRow, int leftCol, int bottomRow, int rightCol, bool addToSelected=False)` SelectCol(*args, **kwargs) `SelectCol(self, int col, bool addToSelected=False)` SelectRow(*args, **kwargs) `SelectRow(self, int row, bool addToSelected=False)` SetAttr(*args, **kwargs) `SetAttr(self, int row, int col, GridCellAttr attr)` SetCellAlignment(*args, **kwargs) `SetCellAlignment(self, int row, int col, int horiz, int vert)` SetCellBackgroundColour(*args, **kwargs) `SetCellBackgroundColour(self, int row, int col, Colour ?)` SetCellEditor(*args, **kwargs) `SetCellEditor(self, int row, int col, GridCellEditor editor)` SetCellFont(*args, **kwargs) `SetCellFont(self, int row, int col, Font ?)` SetCellHighlightColour(*args, **kwargs) `SetCellHighlightColour(self, Colour ?)` SetCellHighlightPenWidth(*args, **kwargs) `SetCellHighlightPenWidth(self, int width)` SetCellHighlightROPenWidth(*args, **kwargs) `SetCellHighlightROPenWidth(self, int width)` SetCellOverflow(*args, **kwargs) `SetCellOverflow(self, int row, int col, bool allow)` SetCellRenderer(*args, **kwargs) `SetCellRenderer(self, int row, int col, GridCellRenderer renderer)` SetCellSize(*args, **kwargs) `SetCellSize(self, int row, int col, int num_rows, int num_cols)` SetCellTextColour(*args, **kwargs) `SetCellTextColour(self, int row, int col, Colour ?)` SetCellValue(*args, **kwargs) `SetCellValue(self, int row, int col, String s)` SetColAttr(*args, **kwargs) `SetColAttr(self, int col, GridCellAttr attr)` SetColFormatBool(*args, **kwargs) `SetColFormatBool(self, int col)` SetColFormatCustom(*args, **kwargs) `SetColFormatCustom(self, int col, String typeName)` SetColFormatFloat(*args, **kwargs) `SetColFormatFloat(self, int col, int width=-1, int precision=-1)` SetColFormatNumber(*args, **kwargs) `SetColFormatNumber(self, int col)` SetColLabelAlignment(*args, **kwargs) `SetColLabelAlignment(self, int horiz, int vert)` SetColLabelSize(*args, **kwargs) `SetColLabelSize(self, int height)` SetColLabelTextOrientation(*args, **kwargs) `SetColLabelTextOrientation(self, int textOrientation)` SetColLabelValue(*args, **kwargs) `SetColLabelValue(self, int col, String ?)` SetColMinimalAcceptableWidth(*args, **kwargs) `SetColMinimalAcceptableWidth(self, int width)` SetColMinimalWidth(*args, **kwargs) `SetColMinimalWidth(self, int col, int width)` SetColPos(*args, **kwargs) `SetColPos(self, int colID, int newPos)` SetColSize(*args, **kwargs) `SetColSize(self, int col, int width)` SetDefaultCellAlignment(*args, **kwargs) `SetDefaultCellAlignment(self, int horiz, int vert)` SetDefaultCellBackgroundColour(*args, **kwargs) `SetDefaultCellBackgroundColour(self, Colour ?)` SetDefaultCellFont(*args, **kwargs) `SetDefaultCellFont(self, Font ?)` SetDefaultCellOverflow(*args, **kwargs) `SetDefaultCellOverflow(self, bool allow)` SetDefaultCellTextColour(*args, **kwargs) `SetDefaultCellTextColour(self, Colour ?)` SetDefaultColSize(*args, **kwargs) `SetDefaultColSize(self, int width, bool resizeExistingCols=False)` SetDefaultEditor(*args, **kwargs) `SetDefaultEditor(self, GridCellEditor editor)` SetDefaultRenderer(*args, **kwargs) `SetDefaultRenderer(self, GridCellRenderer renderer)` SetDefaultRowSize(*args, **kwargs) `SetDefaultRowSize(self, int height, bool resizeExistingRows=False)` SetGridCursor(*args, **kwargs) `SetGridCursor(self, int row, int col)` SetGridLineColour(*args, **kwargs) `SetGridLineColour(self, Colour ?)` SetLabelBackgroundColour(*args, **kwargs) `SetLabelBackgroundColour(self, Colour ?)` SetLabelFont(*args, **kwargs) `SetLabelFont(self, Font ?)` SetLabelTextColour(*args, **kwargs) `SetLabelTextColour(self, Colour ?)` SetMargins(*args, **kwargs) `SetMargins(self, int extraWidth, int extraHeight)` SetReadOnly(*args, **kwargs) `SetReadOnly(self, int row, int col, bool isReadOnly=True)` SetRowAttr(*args, **kwargs) `SetRowAttr(self, int row, GridCellAttr attr)` SetRowLabelAlignment(*args, **kwargs) `SetRowLabelAlignment(self, int horiz, int vert)` SetRowLabelSize(*args, **kwargs) `SetRowLabelSize(self, int width)` SetRowLabelValue(*args, **kwargs) `SetRowLabelValue(self, int row, String ?)` SetRowMinimalAcceptableHeight(*args, **kwargs) `SetRowMinimalAcceptableHeight(self, int width)` SetRowMinimalHeight(*args, **kwargs) `SetRowMinimalHeight(self, int row, int width)` SetRowSize(*args, **kwargs) `SetRowSize(self, int row, int height)` SetScrollLineX(*args, **kwargs) `SetScrollLineX(self, int x)` SetScrollLineY(*args, **kwargs) `SetScrollLineY(self, int y)` SetSelectionBackground(*args, **kwargs) `SetSelectionBackground(self, Colour c)` SetSelectionForeground(*args, **kwargs) `SetSelectionForeground(self, Colour c)` SetSelectionMode(*args, **kwargs) `SetSelectionMode(self, WXGRIDSELECTIONMODES selmode)` SetTable(*args, **kwargs) `SetTable(self, GridTableBase table, bool takeOwnership=False, WXGRIDSELECTIONMODES selmode=wxGridSelectCells) -> bool` ShowCellEditControl(*args, **kwargs) `ShowCellEditControl(self)` XToCol(*args, **kwargs) `XToCol(self, int x, bool clipToMinMax=False) -> int` XToEdgeOfCol(*args, **kwargs) `XToEdgeOfCol(self, int x) -> int` XYToCell(*args, **kwargs) `XYToCell(self, int x, int y) -> GridCellCoords` YToEdgeOfRow(*args, **kwargs) `YToEdgeOfRow(self, int y) -> int` YToRow(*args, **kwargs) `YToRow(self, int y) -> int` __repr__ = _swig_repr(self) Static methods inherited from wx.grid.Grid: GetClassDefaultAttributes(*args, **kwargs) `GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes. The variant parameter is only relevant under Mac currently and is ignore under other platforms. Under Mac, it will change the size of the returned font. See `wx.Window.SetWindowVariant` for more about this.` Data descriptors inherited from wx.grid.Grid: BatchCount `See `GetBatchCount`` CellHighlightColour `See `GetCellHighlightColour` and `SetCellHighlightColour`` CellHighlightPenWidth `See `GetCellHighlightPenWidth` and `SetCellHighlightPenWidth`` CellHighlightROPenWidth `See `GetCellHighlightROPenWidth` and `SetCellHighlightROPenWidth`` CellSize `See `GetCellSize` and `SetCellSize`` ColLabelAlignment `See `GetColLabelAlignment` and `SetColLabelAlignment`` ColLabelSize `See `GetColLabelSize` and `SetColLabelSize`` ColLabelTextOrientation `See `GetColLabelTextOrientation` and `SetColLabelTextOrientation`` ColMinimalAcceptableWidth `See `GetColMinimalAcceptableWidth` and `SetColMinimalAcceptableWidth`` DefaultCellAlignment `See `GetDefaultCellAlignment` and `SetDefaultCellAlignment`` DefaultCellBackgroundColour `See `GetDefaultCellBackgroundColour` and `SetDefaultCellBackgroundColour`` DefaultCellFont `See `GetDefaultCellFont` and `SetDefaultCellFont`` DefaultCellOverflow `See `GetDefaultCellOverflow` and `SetDefaultCellOverflow`` DefaultCellTextColour `See `GetDefaultCellTextColour` and `SetDefaultCellTextColour`` DefaultColLabelSize `See `GetDefaultColLabelSize`` DefaultColSize `See `GetDefaultColSize` and `SetDefaultColSize`` DefaultEditor `See `GetDefaultEditor` and `SetDefaultEditor`` DefaultGridLinePen `See `GetDefaultGridLinePen`` DefaultRenderer `See `GetDefaultRenderer` and `SetDefaultRenderer`` DefaultRowLabelSize `See `GetDefaultRowLabelSize`` DefaultRowSize `See `GetDefaultRowSize` and `SetDefaultRowSize`` GridColLabelWindow `See `GetGridColLabelWindow`` GridCornerLabelWindow `See `GetGridCornerLabelWindow`` GridCursorCol `See `GetGridCursorCol`` GridCursorRow `See `GetGridCursorRow`` GridLineColour `See `GetGridLineColour` and `SetGridLineColour`` GridRowLabelWindow `See `GetGridRowLabelWindow`` GridWindow `See `GetGridWindow`` LabelBackgroundColour `See `GetLabelBackgroundColour` and `SetLabelBackgroundColour`` LabelFont `See `GetLabelFont` and `SetLabelFont`` LabelTextColour `See `GetLabelTextColour` and `SetLabelTextColour`` NumberCols `See `GetNumberCols`` NumberRows `See `GetNumberRows`` RowLabelAlignment `See `GetRowLabelAlignment` and `SetRowLabelAlignment`` RowLabelSize `See `GetRowLabelSize` and `SetRowLabelSize`` RowMinimalAcceptableHeight `See `GetRowMinimalAcceptableHeight` and `SetRowMinimalAcceptableHeight`` ScrollLineX `See `GetScrollLineX` and `SetScrollLineX`` ScrollLineY `See `GetScrollLineY` and `SetScrollLineY`` SelectedCells `See `GetSelectedCells`` SelectedCols `See `GetSelectedCols`` SelectedRows `See `GetSelectedRows`` SelectionBackground `See `GetSelectionBackground` and `SetSelectionBackground`` SelectionBlockBottomRight `See `GetSelectionBlockBottomRight`` SelectionBlockTopLeft `See `GetSelectionBlockTopLeft`` SelectionForeground `See `GetSelectionForeground` and `SetSelectionForeground`` SelectionMode `See `GetSelectionMode` and `SetSelectionMode`` Table `See `GetTable` and `SetTable`` thisown `The membership flag` Data and other attributes inherited from wx.grid.Grid: SelectCells = 0 SelectColumns = 2 SelectRows = 1 wxGridSelectCells = 0 wxGridSelectColumns = 2 wxGridSelectRows = 1 Methods inherited from wx._windows.ScrolledWindow: AdjustScrollbars(*args, **kwargs) `AdjustScrollbars(self)` CalcScrollInc(*args, **kwargs) `CalcScrollInc(self, ScrollWinEvent event) -> int` CalcScrolledPosition(*args) `CalcScrolledPosition(self, Point pt) -> Point CalcScrolledPosition(int x, int y) -> (sx, sy) Translate between scrolled and unscrolled coordinates.` CalcUnscrolledPosition(*args) `CalcUnscrolledPosition(self, Point pt) -> Point CalcUnscrolledPosition(int x, int y) -> (ux, uy) Translate between scrolled and unscrolled coordinates.` DoPrepareDC(*args, **kwargs) `DoPrepareDC(self, DC dc) Normally what is called by `PrepareDC`.` EnableScrolling(*args, **kwargs) `EnableScrolling(self, bool x_scrolling, bool y_scrolling)` GetScaleX(*args, **kwargs) `GetScaleX(self) -> double` GetScaleY(*args, **kwargs) `GetScaleY(self) -> double` GetScrollPageSize(*args, **kwargs) `GetScrollPageSize(self, int orient) -> int` GetScrollPixelsPerUnit(*args, **kwargs) `GetScrollPixelsPerUnit() -> (xUnit, yUnit) Get the size of one logical unit in physical units.` GetTargetWindow(*args, **kwargs) `GetTargetWindow(self) -> Window` GetViewStart(*args, **kwargs) `GetViewStart() -> (x,y) Get the view start` Scroll(*args, **kwargs) `Scroll(self, int x, int y)` SetScale(*args, **kwargs) `SetScale(self, double xs, double ys)` SetScrollPageSize(*args, **kwargs) `SetScrollPageSize(self, int orient, int pageSize)` SetScrollRate(*args, **kwargs) `SetScrollRate(self, int xstep, int ystep)` SetScrollbars(*args, **kwargs) `SetScrollbars(self, int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, int xPos=0, int yPos=0, bool noRefresh=False)` SetTargetWindow(*args, **kwargs) `SetTargetWindow(self, Window target)` Data descriptors inherited from wx._windows.ScrolledWindow: ScaleX `See `GetScaleX`` ScaleY `See `GetScaleY`` TargetWindow `See `GetTargetWindow` and `SetTargetWindow`` ViewStart `See `GetViewStart`` Methods inherited from wx._windows.Panel: SetFocusIgnoringChildren(*args, **kwargs) `SetFocusIgnoringChildren(self) In contrast to `SetFocus` (see above) this will set the focus to the panel even of there are child windows in the panel. This is only rarely needed.` Methods inherited from wx._core.Window: AcceptsFocus(*args, **kwargs) `AcceptsFocus(self) -> bool Can this window have focus?` AcceptsFocusFromKeyboard(*args, **kwargs) `AcceptsFocusFromKeyboard(self) -> bool Can this window be given focus by keyboard navigation? if not, the only way to give it focus (provided it accepts it at all) is to click it.` AddChild(*args, **kwargs) `AddChild(self, Window child) Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer.` AdjustForLayoutDirection(*args, **kwargs) `AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int Mirror coordinates for RTL layout if this window uses it and if the mirroring is not done automatically like Win32.` AssociateHandle(*args, **kwargs) `AssociateHandle(self, long handle) Associate the window with a new native handle` CacheBestSize(*args, **kwargs) `CacheBestSize(self, Size size) Cache the best size so it doesn't need to be calculated again, (at least until some properties of the window change.)` CanSetTransparent(*args, **kwargs) `CanSetTransparent(self) -> bool Returns ``True`` if the platform supports setting the transparency for this window. Note that this method will err on the side of caution, so it is possible that this will return ``False`` when it is in fact possible to set the transparency. NOTE: On X-windows systems the X server must have the composite extension loaded, and there must be a composite manager program (such as xcompmgr) running.` CaptureMouse(*args, **kwargs) `CaptureMouse(self) Directs all mouse input to this window. Call wx.Window.ReleaseMouse to release the capture. Note that wxWindows maintains the stack of windows having captured the mouse and when the mouse is released the capture returns to the window which had had captured it previously and it is only really released if there were no previous window. In particular, this means that you must release the mouse as many times as you capture it, unless the window receives the `wx.MouseCaptureLostEvent` event. Any application which captures the mouse in the beginning of some operation *must* handle `wx.MouseCaptureLostEvent` and cancel this operation when it receives the event. The event handler must not recapture mouse.` Center(*args, **kwargs) `Center(self, int direction=BOTH) Centers the window. The parameter specifies the direction for centering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen.` CenterOnParent(*args, **kwargs) `CenterOnParent(self, int dir=BOTH) Center with respect to the the parent window` Centre = Center(*args, **kwargs) `Center(self, int direction=BOTH) Centers the window. The parameter specifies the direction for centering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen.` CentreOnParent = CenterOnParent(*args, **kwargs) `CenterOnParent(self, int dir=BOTH) Center with respect to the the parent window` ClearBackground(*args, **kwargs) `ClearBackground(self) Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated.` ClientToScreen(*args, **kwargs) `ClientToScreen(self, Point pt) -> Point Converts to screen coordinates from coordinates relative to this window.` ClientToScreenXY(*args, **kwargs) `ClientToScreenXY(int x, int y) -> (x,y) Converts to screen coordinates from coordinates relative to this window.` ClientToWindowSize(*args, **kwargs) `ClientToWindowSize(self, Size size) -> Size` Close(*args, **kwargs) `Close(self, bool force=False) -> bool This function simply generates a EVT_CLOSE event whose handler usually tries to close the window. It doesn't close the window itself, however. If force is False (the default) then the window's close handler will be allowed to veto the destruction of the window.` ConvertDialogPointToPixels(*args, **kwargs) `ConvertDialogPointToPixels(self, Point pt) -> Point Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.` ConvertDialogSizeToPixels(*args, **kwargs) `ConvertDialogSizeToPixels(self, Size sz) -> Size Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.` ConvertPixelPointToDialog(*args, **kwargs) `ConvertPixelPointToDialog(self, Point pt) -> Point` ConvertPixelSizeToDialog(*args, **kwargs) `ConvertPixelSizeToDialog(self, Size sz) -> Size` DLG_PNT(*args, **kwargs) `DLG_PNT(self, Point pt) -> Point Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.` DLG_SZE(*args, **kwargs) `DLG_SZE(self, Size sz) -> Size Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font changes. For the x dimension, the dialog units are multiplied by the average character width and then divided by 4. For the y dimension, the dialog units are multiplied by the average character height and then divided by 8.` Destroy(*args, **kwargs) `Destroy(self) -> bool Destroys the window safely. Frames and dialogs are not destroyed immediately when this function is called -- they are added to a list of windows to be deleted on idle time, when all the window's events have been processed. This prevents problems with events being sent to non-existent windows. Returns True if the window has either been successfully deleted, or it has been added to the list of windows pending real deletion.` DestroyChildren(*args, **kwargs) `DestroyChildren(self) -> bool Destroys all children of a window. Called automatically by the destructor.` Disable(*args, **kwargs) `Disable(self) -> bool Disables the window, same as Enable(false).` DissociateHandle(*args, **kwargs) `DissociateHandle(self) Dissociate the current native handle from the window` DragAcceptFiles(*args, **kwargs) `DragAcceptFiles(self, bool accept) Enables or disables eligibility for drop file events, EVT_DROP_FILES.` Enable(*args, **kwargs) `Enable(self, bool enable=True) -> bool Enable or disable the window for user input. Note that when a parent window is disabled, all of its children are disabled as well and they are reenabled again when the parent is. Returns true if the window has been enabled or disabled, false if nothing was done, i.e. if the window had already been in the specified state.` FindWindowById(*args, **kwargs) `FindWindowById(self, long winid) -> Window Find a child of this window by window ID` FindWindowByLabel(*args, **kwargs) `FindWindowByLabel(self, String label) -> Window Find a child of this window by label` FindWindowByName(*args, **kwargs) `FindWindowByName(self, String name) -> Window Find a child of this window by name` Fit(*args, **kwargs) `Fit(self) Sizes the window so that it fits around its subwindows. This function won't do anything if there are no subwindows and will only really work correctly if sizers are used for the subwindows layout. Also, if the window has exactly one subwindow it is better (faster and the result is more precise as Fit adds some margin to account for fuzziness of its calculations) to call window.SetClientSize(child.GetSize()) instead of calling Fit.` FitInside(*args, **kwargs) `FitInside(self) Similar to Fit, but sizes the interior (virtual) size of a window. Mainly useful with scrolled windows to reset scrollbars after sizing changes that do not trigger a size event, and/or scrolled windows without an interior sizer. This function similarly won't do anything if there are no subwindows.` Freeze(*args, **kwargs) `Freeze(self) Freezes the window or, in other words, prevents any updates from taking place on screen, the window is not redrawn at all. Thaw must be called to reenable window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw being delayed until all the nesting has been undone. This method is useful for visual appearance optimization (for example, it is a good idea to use it before inserting large amount of text into a wxTextCtrl under wxGTK) but is not implemented on all platforms nor for all controls so it is mostly just a hint to wxWindows and not a mandatory directive.` GetAcceleratorTable(*args, **kwargs) `GetAcceleratorTable(self) -> AcceleratorTable Gets the accelerator table for this window.` GetAdjustedBestSize = deprecatedWrapper(*args, **kwargs) `Use `GetEffectiveMinSize` instead.` GetAutoLayout(*args, **kwargs) `GetAutoLayout(self) -> bool Returns the current autoLayout setting` GetBackgroundColour(*args, **kwargs) `GetBackgroundColour(self) -> Colour Returns the background colour of the window.` GetBackgroundStyle(*args, **kwargs) `GetBackgroundStyle(self) -> int Returns the background style of the window. :see: `SetBackgroundStyle`` GetBestFittingSize = deprecatedWrapper(*args, **kwargs) `Use `GetEffectiveMinSize` instead.` GetBestSize(*args, **kwargs) `GetBestSize(self) -> Size This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.` GetBestSizeTuple(*args, **kwargs) `GetBestSizeTuple() -> (width, height) This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (such as wx.Panel), the size returned by this function will be the same as the size the window would have had after calling Fit.` GetBestVirtualSize(*args, **kwargs) `GetBestVirtualSize(self) -> Size Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means)` GetBorder(*args) `GetBorder(self, long flags) -> int GetBorder(self) -> int Get border for the flags of this window` GetCaret(*args, **kwargs) `GetCaret(self) -> Caret Returns the caret associated with the window.` GetCharHeight(*args, **kwargs) `GetCharHeight(self) -> int Get the (average) character size for the current font.` GetCharWidth(*args, **kwargs) `GetCharWidth(self) -> int Get the (average) character size for the current font.` GetChildren(*args, **kwargs) `GetChildren(self) -> WindowList Returns an object containing a list of the window's children. The object provides a Python sequence-like interface over the internal list maintained by the window..` GetClientAreaOrigin(*args, **kwargs) `GetClientAreaOrigin(self) -> Point Get the origin of the client area of the window relative to the window's top left corner (the client area may be shifted because of the borders, scrollbars, other decorations...)` GetClientRect(*args, **kwargs) `GetClientRect(self) -> Rect Get the client area position and size as a `wx.Rect` object.` GetClientSize(*args, **kwargs) `GetClientSize(self) -> Size This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.` GetClientSizeTuple(*args, **kwargs) `GetClientSizeTuple() -> (width, height) This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc.` GetConstraints(*args, **kwargs) `GetConstraints(self) -> LayoutConstraints Returns a pointer to the window's layout constraints, or None if there are none.` GetContainingSizer(*args, **kwargs) `GetContainingSizer(self) -> Sizer Return the sizer that this window is a member of, if any, otherwise None.` GetCursor(*args, **kwargs) `GetCursor(self) -> Cursor Return the cursor associated with this window.` GetDefaultAttributes(*args, **kwargs) `GetDefaultAttributes(self) -> VisualAttributes Get the default attributes for an instance of this class. This is useful if you want to use the same font or colour in your own control as in a standard control -- which is a much better idea than hard coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes.` GetDropTarget(*args, **kwargs) `GetDropTarget(self) -> DropTarget Returns the associated drop target, which may be None.` GetEffectiveMinSize(*args, **kwargs) `GetEffectiveMinSize(self) -> Size This function will merge the window's best size into the window's minimum size, giving priority to the min size components, and returns the results.` GetEventHandler(*args, **kwargs) `GetEventHandler(self) -> EvtHandler Returns the event handler for this window. By default, the window is its own event handler.` GetExtraStyle(*args, **kwargs) `GetExtraStyle(self) -> long Returns the extra style bits for the window.` GetFont(*args, **kwargs) `GetFont(self) -> Font Returns the default font used for this window.` GetForegroundColour(*args, **kwargs) `GetForegroundColour(self) -> Colour Returns the foreground colour of the window. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all.` GetFullTextExtent(*args, **kwargs) `GetFullTextExtent(String string, Font font=None) -> (width, height, descent, externalLeading) Get the width, height, decent and leading of the text using the current or specified font.` GetGrandParent(*args, **kwargs) `GetGrandParent(self) -> Window Returns the parent of the parent of this window, or None if there isn't one.` GetGtkWidget(*args, **kwargs) `GetGtkWidget(self) -> long On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.` GetHandle(*args, **kwargs) `GetHandle(self) -> long Returns the platform-specific handle (as a long integer) of the physical window. On wxMSW this is the win32 window handle, on wxGTK it is the XWindow ID, and on wxMac it is the ControlRef.` GetHelpText(*args, **kwargs) `GetHelpText(self) -> String Gets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current `wx.HelpProvider` implementation, and not in the window object itself.` GetHelpTextAtPoint(*args, **kwargs) `GetHelpTextAtPoint(self, Point pt, wxHelpEvent::Origin origin) -> String Get the help string associated with the given position in this window. Notice that pt may be invalid if event origin is keyboard or unknown and this method should return the global window help text then` GetId(*args, **kwargs) `GetId(self) -> int Returns the identifier of the window. Each window has an integer identifier. If the application has not provided one (or the default Id -1 is used) then an unique identifier with a negative value will be generated.` GetLabel(*args, **kwargs) `GetLabel(self) -> String Generic way of getting a label from any window, for identification purposes. The interpretation of this function differs from class to class. For frames and dialogs, the value returned is the title. For buttons or static text controls, it is the button text. This function can be useful for meta-programs such as testing tools or special-needs access programs)which need to identify windows by name.` GetLayoutDirection(*args, **kwargs) `GetLayoutDirection(self) -> int Get the layout direction (LTR or RTL) for this window. Returns ``wx.Layout_Default`` if layout direction is not supported.` GetMaxHeight(*args, **kwargs) `GetMaxHeight(self) -> int` GetMaxSize(*args, **kwargs) `GetMaxSize(self) -> Size` GetMaxWidth(*args, **kwargs) `GetMaxWidth(self) -> int` GetMinHeight(*args, **kwargs) `GetMinHeight(self) -> int` GetMinSize(*args, **kwargs) `GetMinSize(self) -> Size` GetMinWidth(*args, **kwargs) `GetMinWidth(self) -> int` GetName(*args, **kwargs) `GetName(self) -> String Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName.` GetParent(*args, **kwargs) `GetParent(self) -> Window Returns the parent window of this window, or None if there isn't one.` GetPosition(*args, **kwargs) `GetPosition(self) -> Point Get the window's position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use `GetScreenPosition` if you need screen coordinates for all kinds of windows.` GetPositionTuple(*args, **kwargs) `GetPositionTuple() -> (x,y) Get the window's position. Notice that the position is in client coordinates for child windows and screen coordinates for the top level ones, use `GetScreenPosition` if you need screen coordinates for all kinds of windows.` GetRect(*args, **kwargs) `GetRect(self) -> Rect Returns the size and position of the window as a `wx.Rect` object.` GetScreenPosition(*args, **kwargs) `GetScreenPosition(self) -> Point Get the position of the window in screen coordinantes.` GetScreenPositionTuple(*args, **kwargs) `GetScreenPositionTuple() -> (x,y) Get the position of the window in screen coordinantes.` GetScreenRect(*args, **kwargs) `GetScreenRect(self) -> Rect Returns the size and position of the window in screen coordinantes as a `wx.Rect` object.` GetScrollPos(*args, **kwargs) `GetScrollPos(self, int orientation) -> int Returns the built-in scrollbar position.` GetScrollRange(*args, **kwargs) `GetScrollRange(self, int orientation) -> int Returns the built-in scrollbar range.` GetScrollThumb(*args, **kwargs) `GetScrollThumb(self, int orientation) -> int Returns the built-in scrollbar thumb size.` GetSize(*args, **kwargs) `GetSize(self) -> Size Get the window size.` GetSizeTuple(*args, **kwargs) `GetSizeTuple() -> (width, height) Get the window size.` GetSizer(*args, **kwargs) `GetSizer(self) -> Sizer Return the sizer associated with the window by a previous call to SetSizer or None if there isn't one.` GetTextExtent(*args, **kwargs) `GetTextExtent(String string) -> (width, height) Get the width and height of the text using the current font.` GetThemeEnabled(*args, **kwargs) `GetThemeEnabled(self) -> bool Return the themeEnabled flag.` GetToolTip(*args, **kwargs) `GetToolTip(self) -> ToolTip get the associated tooltip or None if none` GetTopLevelParent(*args, **kwargs) `GetTopLevelParent(self) -> Window Returns the first frame or dialog in this window's parental hierarchy.` GetUpdateClientRect(*args, **kwargs) `GetUpdateClientRect(self) -> Rect Get the update rectangle region bounding box in client coords.` GetUpdateRegion(*args, **kwargs) `GetUpdateRegion(self) -> Region Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler.` GetValidator(*args, **kwargs) `GetValidator(self) -> Validator Returns a pointer to the current validator for the window, or None if there is none.` GetVirtualSize(*args, **kwargs) `GetVirtualSize(self) -> Size Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.` GetVirtualSizeTuple(*args, **kwargs) `GetVirtualSizeTuple() -> (width, height) Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.` GetWindowBorderSize(*args, **kwargs) `GetWindowBorderSize(self) -> Size Return the size of the left/right and top/bottom borders.` GetWindowStyle = GetWindowStyleFlag(*args, **kwargs) `GetWindowStyleFlag(self) -> long Gets the window style that was passed to the constructor or Create method.` GetWindowStyleFlag(*args, **kwargs) `GetWindowStyleFlag(self) -> long Gets the window style that was passed to the constructor or Create method.` GetWindowVariant(*args, **kwargs) `GetWindowVariant(self) -> int` HasCapture(*args, **kwargs) `HasCapture(self) -> bool Returns true if this window has the current mouse capture.` HasFlag(*args, **kwargs) `HasFlag(self, int flag) -> bool Test if the given style is set for this window.` HasMultiplePages(*args, **kwargs) `HasMultiplePages(self) -> bool` HasScrollbar(*args, **kwargs) `HasScrollbar(self, int orient) -> bool Does the window have the scrollbar for this orientation?` HasTransparentBackground(*args, **kwargs) `HasTransparentBackground(self) -> bool Returns True if this window's background is transparent (as, for example, for `wx.StaticText`) and should show the parent window's background. This method is mostly used internally by the library itself and you normally shouldn't have to call it. You may, however, have to override it in your custom control classes to ensure that background is painted correctly.` Hide(*args, **kwargs) `Hide(self) -> bool Equivalent to calling Show(False).` HitTest(*args, **kwargs) `HitTest(self, Point pt) -> int Test where the given (in client coords) point lies` HitTestXY(*args, **kwargs) `HitTestXY(self, int x, int y) -> int Test where the given (in client coords) point lies` InheritAttributes(*args, **kwargs) `InheritAttributes(self) This function is (or should be, in case of custom controls) called during window creation to intelligently set up the window visual attributes, that is the font and the foreground and background colours. By 'intelligently' the following is meant: by default, all windows use their own default attributes. However if some of the parent's attributes are explicitly changed (that is, using SetFont and not SetOwnFont) and if the corresponding attribute hadn't been explicitly set for this window itself, then this window takes the same value as used by the parent. In addition, if the window overrides ShouldInheritColours to return false, the colours will not be changed no matter what and only the font might. This rather complicated logic is necessary in order to accommodate the different usage scenarios. The most common one is when all default attributes are used and in this case, nothing should be inherited as in modern GUIs different controls use different fonts (and colours) than their siblings so they can't inherit the same value from the parent. However it was also deemed desirable to allow to simply change the attributes of all children at once by just changing the font or colour of their common parent, hence in this case we do inherit the parents attributes.` InheritsBackgroundColour(*args, **kwargs) `InheritsBackgroundColour(self) -> bool` InitDialog(*args, **kwargs) `InitDialog(self) Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators.` InvalidateBestSize(*args, **kwargs) `InvalidateBestSize(self) Reset the cached best size value so it will be recalculated the next time it is needed.` IsBeingDeleted(*args, **kwargs) `IsBeingDeleted(self) -> bool Is the window in the process of being deleted?` IsDoubleBuffered(*args, **kwargs) `IsDoubleBuffered(self) -> bool Returns ``True`` if the window contents is double-buffered by the system, i.e. if any drawing done on the window is really done on a temporary backing surface and transferred to the screen all at once later.` IsEnabled(*args, **kwargs) `IsEnabled(self) -> bool Returns true if the window is enabled for input, false otherwise.` IsExposed(*args, **kwargs) `IsExposed(self, int x, int y, int w=1, int h=1) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed.` IsExposedPoint(*args, **kwargs) `IsExposedPoint(self, Point pt) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed.` IsExposedRect(*args, **kwargs) `IsExposedRect(self, Rect rect) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed.` IsFrozen(*args, **kwargs) `IsFrozen(self) -> bool Returns ``True`` if the window has been frozen and not thawed yet. :see: `Freeze` and `Thaw`` IsRetained(*args, **kwargs) `IsRetained(self) -> bool Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms.` IsShown(*args, **kwargs) `IsShown(self) -> bool Returns true if the window is shown, false if it has been hidden.` IsShownOnScreen(*args, **kwargs) `IsShownOnScreen(self) -> bool Returns ``True`` if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well.` IsTopLevel(*args, **kwargs) `IsTopLevel(self) -> bool Returns true if the given window is a top-level one. Currently all frames and dialogs are always considered to be top-level windows (even if they have a parent window).` Layout(*args, **kwargs) `Layout(self) -> bool Invokes the constraint-based layout algorithm or the sizer-based algorithm for this window. See SetAutoLayout: when auto layout is on, this function gets called automatically by the default EVT_SIZE handler when the window is resized.` LineDown(*args, **kwargs) `LineDown(self) -> bool This is just a wrapper for ScrollLines(1).` LineUp(*args, **kwargs) `LineUp(self) -> bool This is just a wrapper for ScrollLines(-1).` Lower(*args, **kwargs) `Lower(self) Lowers the window to the bottom of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.` MakeModal(*args, **kwargs) `MakeModal(self, bool modal=True) Disables all other windows in the application so that the user can only interact with this window. Passing False will reverse this effect.` Move(*args, **kwargs) `Move(self, Point pt, int flags=SIZE_USE_EXISTING) Moves the window to the given position.` MoveAfterInTabOrder(*args, **kwargs) `MoveAfterInTabOrder(self, Window win) Moves this window in the tab navigation order after the specified sibling window. This means that when the user presses the TAB key on that other window, the focus switches to this window. The default tab order is the same as creation order. This function and `MoveBeforeInTabOrder` allow to change it after creating all the windows.` MoveBeforeInTabOrder(*args, **kwargs) `MoveBeforeInTabOrder(self, Window win) Same as `MoveAfterInTabOrder` except that it inserts this window just before win instead of putting it right after it.` MoveXY(*args, **kwargs) `MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) Moves the window to the given position.` Navigate(*args, **kwargs) `Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool Does keyboard navigation from this window to another, by sending a `wx.NavigationKeyEvent`.` PageDown(*args, **kwargs) `PageDown(self) -> bool This is just a wrapper for ScrollPages(1).` PageUp(*args, **kwargs) `PageUp(self) -> bool This is just a wrapper for ScrollPages(-1).` PopEventHandler(*args, **kwargs) `PopEventHandler(self, bool deleteHandler=False) -> EvtHandler Removes and returns the top-most event handler on the event handler stack. If deleteHandler is True then the wx.EvtHandler object will be destroyed after it is popped, and ``None`` will be returned instead.` PopupMenu(*args, **kwargs) `PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usual. If the default position is given then the current position of the mouse cursor will be used.` PopupMenuXY(*args, **kwargs) `PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usual. If the default position is given then the current position of the mouse cursor will be used.` PostCreate(self, pre) `Phase 3 of the 2-phase create <wink!> Call this method after precreating the window with the 2-phase create method.` PrepareDC(*args, **kwargs) `PrepareDC(self, DC dc) Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position.` PushEventHandler(*args, **kwargs) `PushEventHandler(self, EvtHandler handler) Pushes this event handler onto the event handler stack for the window. An event handler is an object that is capable of processing the events sent to a window. (In other words, is able to dispatch the events to a handler function.) By default, the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes. wx.Window.PushEventHandler allows an application to set up a chain of event handlers, where an event not handled by one event handler is handed to the next one in the chain. Use `wx.Window.PopEventHandler` to remove the event handler. Ownership of the handler is *not* given to the window, so you should be sure to pop the handler before the window is destroyed and either let PopEventHandler destroy it, or call its Destroy method yourself.` Raise(*args, **kwargs) `Raise(self) Raises the window to the top of the window hierarchy. In current version of wxWidgets this works both for managed and child windows.` Refresh(*args, **kwargs) `Refresh(self, bool eraseBackground=True, Rect rect=None) Mark the specified rectangle (or the whole window) as "dirty" so it will be repainted. Causes an EVT_PAINT event to be generated and sent to the window.` RefreshRect(*args, **kwargs) `RefreshRect(self, Rect rect, bool eraseBackground=True) Redraws the contents of the given rectangle: the area inside it will be repainted. This is the same as Refresh but has a nicer syntax.` RegisterHotKey(*args, **kwargs) `RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool Registers a system wide hotkey. Every time the user presses the hotkey registered here, this window will receive a hotkey event. It will receive the event even if the application is in the background and does not have the input focus because the user is working with some other application. To bind an event handler function to this hotkey use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the hotkey was registered successfully.` ReleaseMouse(*args, **kwargs) `ReleaseMouse(self) Releases mouse input captured with wx.Window.CaptureMouse.` RemoveChild(*args, **kwargs) `RemoveChild(self, Window child) Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer.` RemoveEventHandler(*args, **kwargs) `RemoveEventHandler(self, EvtHandler handler) -> bool Find the given handler in the event handler chain and remove (but not delete) it from the event handler chain, returns True if it was found and False otherwise (this also results in an assert failure so this function should only be called when the handler is supposed to be there.)` Reparent(*args, **kwargs) `Reparent(self, Window newParent) -> bool Reparents the window, i.e the window will be removed from its current parent window (e.g. a non-standard toolbar in a wxFrame) and then re-inserted into another. Available on Windows and GTK. Returns True if the parent was changed, False otherwise (error or newParent == oldParent)` ScreenToClient(*args, **kwargs) `ScreenToClient(self, Point pt) -> Point Converts from screen to client window coordinates.` ScreenToClientXY(*args, **kwargs) `ScreenToClientXY(int x, int y) -> (x,y) Converts from screen to client window coordinates.` ScrollLines(*args, **kwargs) `ScrollLines(self, int lines) -> bool If the platform and window class supports it, scrolls the window by the given number of lines down, if lines is positive, or up if lines is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done.` ScrollPages(*args, **kwargs) `ScrollPages(self, int pages) -> bool If the platform and window class supports it, scrolls the window by the given number of pages down, if pages is positive, or up if pages is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done.` ScrollWindow(*args, **kwargs) `ScrollWindow(self, int dx, int dy, Rect rect=None) Physically scrolls the pixels in the window and move child windows accordingly. Use this function to optimise your scrolling implementations, to minimise the area that must be redrawn. Note that it is rarely required to call this function from a user program.` SendSizeEvent(self) SetAcceleratorTable(*args, **kwargs) `SetAcceleratorTable(self, AcceleratorTable accel) Sets the accelerator table for this window.` SetAutoLayout(*args, **kwargs) `SetAutoLayout(self, bool autoLayout) Determines whether the Layout function will be called automatically when the window is resized. lease note that this only happens for the windows usually used to contain children, namely `wx.Panel` and `wx.TopLevelWindow` (and the classes deriving from them). This method is called implicitly by `SetSizer` but if you use `SetConstraints` you should call it manually or otherwise the window layout won't be correctly updated when its size changes.` SetBackgroundColour(*args, **kwargs) `SetBackgroundColour(self, Colour colour) -> bool Sets the background colour of the window. Returns True if the colour was changed. The background colour is usually painted by the default EVT_ERASE_BACKGROUND event handler function under Windows and automatically under GTK. Using `wx.NullColour` will reset the window to the default background colour. Note that setting the background colour may not cause an immediate refresh, so you may wish to call `ClearBackground` or `Refresh` after calling this function. Using this function will disable attempts to use themes for this window, if the system supports them. Use with care since usually the themes represent the appearance chosen by the user to be used for all applications on the system.` SetBackgroundStyle(*args, **kwargs) `SetBackgroundStyle(self, int style) -> bool Returns the background style of the window. The background style indicates how the background of the window is drawn. ====================== ======================================== wx.BG_STYLE_SYSTEM The background colour or pattern should be determined by the system wx.BG_STYLE_COLOUR The background should be a solid colour wx.BG_STYLE_CUSTOM The background will be implemented by the application. ====================== ======================================== On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of a custom background, such as a tiled bitmap. Currently the style has no effect on other platforms. :see: `GetBackgroundStyle`, `SetBackgroundColour`` SetBestFittingSize = deprecatedWrapper(*args, **kwargs) `Use `SetInitialSize`` SetCaret(*args, **kwargs) `SetCaret(self, Caret caret) Sets the caret associated with the window.` SetClientRect(*args, **kwargs) `SetClientRect(self, Rect rect) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example.` SetClientSize(*args, **kwargs) `SetClientSize(self, Size size) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example.` SetClientSizeWH(*args, **kwargs) `SetClientSizeWH(self, int width, int height) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than wx.Window.SetSize, since the application need not worry about what dimensions the border or title bar have when trying to fit the window around panel items, for example.` SetConstraints(*args, **kwargs) `SetConstraints(self, LayoutConstraints constraints) Sets the window to have the given layout constraints. If an existing layout constraints object is already owned by the window, it will be deleted. Pass None to disassociate and delete the window's current constraints. You must call SetAutoLayout to tell a window to use the constraints automatically in its default EVT_SIZE handler; otherwise, you must handle EVT_SIZE yourself and call Layout() explicitly. When setting both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have effect.` SetContainingSizer(*args, **kwargs) `SetContainingSizer(self, Sizer sizer) This normally does not need to be called by application code. It is called internally when a window is added to a sizer, and is used so the window can remove itself from the sizer when it is destroyed.` SetCursor(*args, **kwargs) `SetCursor(self, Cursor cursor) -> bool Sets the window's cursor. Notice that the window cursor also sets it for the children of the window implicitly. The cursor may be wx.NullCursor in which case the window cursor will be reset back to default.` SetDimensions(*args, **kwargs) `SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels. The sizeFlags parameter indicates the interpretation of the other params if they are equal to -1. ======================== ====================================== wx.SIZE_AUTO A -1 indicates that a class-specific default should be used. wx.SIZE_USE_EXISTING Existing dimensions should be used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be interpreted as real dimensions, not default values. ======================== ======================================` SetDoubleBuffered(*args, **kwargs) `SetDoubleBuffered(self, bool on) Put the native window into double buffered or composited mode.` SetDropTarget(*args, **kwargs) `SetDropTarget(self, DropTarget dropTarget) Associates a drop target with this window. If the window already has a drop target, it is deleted.` SetEventHandler(*args, **kwargs) `SetEventHandler(self, EvtHandler handler) Sets the event handler for this window. An event handler is an object that is capable of processing the events sent to a window. (In other words, is able to dispatch the events to handler function.) By default, the window is its own event handler, but an application may wish to substitute another, for example to allow central implementation of event-handling for a variety of different window classes. It is usually better to use `wx.Window.PushEventHandler` since this sets up a chain of event handlers, where an event not handled by one event handler is handed off to the next one in the chain.` SetExtraStyle(*args, **kwargs) `SetExtraStyle(self, long exStyle) Sets the extra style bits for the window. Extra styles are the less often used style bits which can't be set with the constructor or with SetWindowStyleFlag()` SetFocus(*args, **kwargs) `SetFocus(self) Set's the focus to this window, allowing it to receive keyboard input.` SetFocusFromKbd(*args, **kwargs) `SetFocusFromKbd(self) Set focus to this window as the result of a keyboard action. Normally only called internally.` SetFont(*args, **kwargs) `SetFont(self, Font font) -> bool Sets the font for this window.` SetForegroundColour(*args, **kwargs) `SetForegroundColour(self, Colour colour) -> bool Sets the foreground colour of the window. Returns True is the colour was changed. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all.` SetHelpText(*args, **kwargs) `SetHelpText(self, String text) Sets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current `wx.HelpProvider` implementation, and not in the window object itself.` SetHelpTextForId(*args, **kwargs) `SetHelpTextForId(self, String text) Associate this help text with all windows with the same id as this one.` SetId(*args, **kwargs) `SetId(self, int winid) Sets the identifier of the window. Each window has an integer identifier. If the application has not provided one, an identifier will be generated. Normally, the identifier should be provided on creation and should not be modified subsequently.` SetInitialSize(*args, **kwargs) `SetInitialSize(self, Size size=DefaultSize) A 'Smart' SetSize that will fill in default size components with the window's *best size* values. Also set's the minsize for use with sizers.` SetLabel(*args, **kwargs) `SetLabel(self, String label) Set the text which the window shows in its label if applicable.` SetLayoutDirection(*args, **kwargs) `SetLayoutDirection(self, int dir) Set the layout direction (LTR or RTL) for this window.` SetMaxSize(*args, **kwargs) `SetMaxSize(self, Size maxSize) A more convenient method than `SetSizeHints` for setting just the max size.` SetMinSize(*args, **kwargs) `SetMinSize(self, Size minSize) A more convenient method than `SetSizeHints` for setting just the min size.` SetName(*args, **kwargs) `SetName(self, String name) Sets the window's name. The window name is used for ressource setting in X, it is not the same as the window title/label` SetOwnBackgroundColour(*args, **kwargs) `SetOwnBackgroundColour(self, Colour colour)` SetOwnFont(*args, **kwargs) `SetOwnFont(self, Font font)` SetOwnForegroundColour(*args, **kwargs) `SetOwnForegroundColour(self, Colour colour)` SetPosition = Move(*args, **kwargs) `Move(self, Point pt, int flags=SIZE_USE_EXISTING) Moves the window to the given position.` SetRect(*args, **kwargs) `SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels using a wx.Rect.` SetScrollPos(*args, **kwargs) `SetScrollPos(self, int orientation, int pos, bool refresh=True) Sets the position of one of the built-in scrollbars.` SetScrollbar(*args, **kwargs) `SetScrollbar(self, int orientation, int position, int thumbSize, int range, bool refresh=True) Sets the scrollbar properties of a built-in scrollbar.` SetSize(*args, **kwargs) `SetSize(self, Size size) Sets the size of the window in pixels.` SetSizeHints(*args, **kwargs) `SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the window outside the given bounds (if it is a top-level window.) Sizers will also inspect the minimum window size and will use that value if set when calculating layout. The resizing increments are only significant under Motif or Xt.` SetSizeHintsSz(*args, **kwargs) `SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the window outside the given bounds (if it is a top-level window.) Sizers will also inspect the minimum window size and will use that value if set when calculating layout. The resizing increments are only significant under Motif or Xt.` SetSizeWH(*args, **kwargs) `SetSizeWH(self, int width, int height) Sets the size of the window in pixels.` SetSizer(*args, **kwargs) `SetSizer(self, Sizer sizer, bool deleteOld=True) Sets the window to have the given layout sizer. The window will then own the object, and will take care of its deletion. If an existing layout sizer object is already owned by the window, it will be deleted if the deleteOld parameter is true. Note that this function will also call SetAutoLayout implicitly with a True parameter if the sizer is non-None, and False otherwise.` SetSizerAndFit(*args, **kwargs) `SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) The same as SetSizer, except it also sets the size hints for the window based on the sizer's minimum size.` SetThemeEnabled(*args, **kwargs) `SetThemeEnabled(self, bool enableTheme) This function tells a window if it should use the system's "theme" code to draw the windows' background instead if its own background drawing code. This will only have an effect on platforms that support the notion of themes in user defined windows. One such platform is GTK+ where windows can have (very colourful) backgrounds defined by a user's selected theme. Dialogs, notebook pages and the status bar have this flag set to true by default so that the default look and feel is simulated best.` SetToolTip(*args, **kwargs) `SetToolTip(self, ToolTip tip) Attach a tooltip to the window.` SetToolTipString(*args, **kwargs) `SetToolTipString(self, String tip) Attach a tooltip to the window.` SetTransparent(*args, **kwargs) `SetTransparent(self, byte alpha) -> bool Attempt to set the transparency of this window to the ``alpha`` value, returns True on success. The ``alpha`` value is an integer in the range of 0 to 255, where 0 is fully transparent and 255 is fully opaque.` SetValidator(*args, **kwargs) `SetValidator(self, Validator validator) Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type.` SetVirtualSize(*args, **kwargs) `SetVirtualSize(self, Size size) Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.` SetVirtualSizeHints(*args, **kwargs) `SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds.` SetVirtualSizeHintsSz(*args, **kwargs) `SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds.` SetVirtualSizeWH(*args, **kwargs) `SetVirtualSizeWH(self, int w, int h) Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size.` SetWindowStyle = SetWindowStyleFlag(*args, **kwargs) `SetWindowStyleFlag(self, long style) Sets the style of the window. Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to take place immediately.` SetWindowStyleFlag(*args, **kwargs) `SetWindowStyleFlag(self, long style) Sets the style of the window. Please note that some styles cannot be changed after the window creation and that Refresh() might need to be called after changing the others for the change to take place immediately.` SetWindowVariant(*args, **kwargs) `SetWindowVariant(self, int variant) Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac.` ShouldInheritColours(*args, **kwargs) `ShouldInheritColours(self) -> bool Return true from here to allow the colours of this window to be changed by InheritAttributes, returning false forbids inheriting them from the parent window. The base class version returns false, but this method is overridden in wxControl where it returns true.` Show(*args, **kwargs) `Show(self, bool show=True) -> bool Shows or hides the window. You may need to call Raise for a top level window if you want to bring it to top, although this is not needed if Show is called immediately after the frame creation. Returns True if the window has been shown or hidden or False if nothing was done because it already was in the requested state.` Thaw(*args, **kwargs) `Thaw(self) Reenables window updating after a previous call to Freeze. Calls to Freeze/Thaw may be nested, so Thaw must be called the same number of times that Freeze was before the window will be updated.` ToggleWindowStyle(*args, **kwargs) `ToggleWindowStyle(self, int flag) -> bool Turn the flag on if it had been turned off before and vice versa, returns True if the flag is turned on by this function call.` TransferDataFromWindow(*args, **kwargs) `TransferDataFromWindow(self) -> bool Transfers values from child controls to data areas specified by their validators. Returns false if a transfer failed. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call TransferDataFromWindow() of all child windows.` TransferDataToWindow(*args, **kwargs) `TransferDataToWindow(self) -> bool Transfers values to child controls from data areas specified by their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call TransferDataToWindow() of all child windows.` UnregisterHotKey(*args, **kwargs) `UnregisterHotKey(self, int hotkeyId) -> bool Unregisters a system wide hotkey.` Update(*args, **kwargs) `Update(self) Calling this method immediately repaints the invalidated area of the window instead of waiting for the EVT_PAINT event to happen, (normally this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and does nothing if the window has been already repainted. Use `Refresh` first if you want to immediately redraw the window (or some portion of it) unconditionally.` UpdateWindowUI(*args, **kwargs) `UpdateWindowUI(self, long flags=UPDATE_UI_NONE) This function sends EVT_UPDATE_UI events to the window. The particular implementation depends on the window; for example a wx.ToolBar will send an update UI event for each toolbar button, and a wx.Frame will send an update UI event for each menubar menu item. You can call this function from your application to ensure that your UI is up-to-date at a particular point in time (as far as your EVT_UPDATE_UI handlers are concerned). This may be necessary if you have called `wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to limit the overhead that wxWindows incurs by sending update UI events in idle time.` UseBgCol(*args, **kwargs) `UseBgCol(self) -> bool` Validate(*args, **kwargs) `Validate(self) -> bool Validates the current values of the child controls using their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call Validate() of all child windows. Returns false if any of the validations failed.` WarpPointer(*args, **kwargs) `WarpPointer(self, int x, int y) Moves the pointer to the given position on the window. NOTE: This function is not supported under Mac because Apple Human Interface Guidelines forbid moving the mouse cursor programmatically.` WindowToClientSize(*args, **kwargs) `WindowToClientSize(self, Size size) -> Size` Static methods inherited from wx._core.Window: FindFocus(*args, **kwargs) `FindFocus() -> Window Returns the window or control that currently has the keyboard focus, or None.` GetCapture(*args, **kwargs) `GetCapture() -> Window Returns the window which currently captures the mouse or None` NewControlId(*args, **kwargs) `NewControlId() -> int Generate a control id for the controls which were not given one.` NextControlId(*args, **kwargs) `NextControlId(int winid) -> int Get the id of the control following the one with the given autogenerated) id` PrevControlId(*args, **kwargs) `PrevControlId(int winid) -> int Get the id of the control preceding the one with the given autogenerated) id` Data descriptors inherited from wx._core.Window: AcceleratorTable `See `GetAcceleratorTable` and `SetAcceleratorTable`` AutoLayout `See `GetAutoLayout` and `SetAutoLayout`` BackgroundColour `See `GetBackgroundColour` and `SetBackgroundColour`` BackgroundStyle `See `GetBackgroundStyle` and `SetBackgroundStyle`` BestSize `See `GetBestSize`` BestVirtualSize `See `GetBestVirtualSize`` Border `See `GetBorder`` Caret `See `GetCaret` and `SetCaret`` CharHeight `See `GetCharHeight`` CharWidth `See `GetCharWidth`` Children `See `GetChildren`` ClientAreaOrigin `See `GetClientAreaOrigin`` ClientRect `See `GetClientRect` and `SetClientRect`` ClientSize `See `GetClientSize` and `SetClientSize`` Constraints `See `GetConstraints` and `SetConstraints`` ContainingSizer `See `GetContainingSizer` and `SetContainingSizer`` Cursor `See `GetCursor` and `SetCursor`` DefaultAttributes `See `GetDefaultAttributes`` DropTarget `See `GetDropTarget` and `SetDropTarget`` EffectiveMinSize `See `GetEffectiveMinSize`` Enabled `See `IsEnabled` and `Enable`` EventHandler `See `GetEventHandler` and `SetEventHandler`` ExtraStyle `See `GetExtraStyle` and `SetExtraStyle`` Font `See `GetFont` and `SetFont`` ForegroundColour `See `GetForegroundColour` and `SetForegroundColour`` GrandParent `See `GetGrandParent`` GtkWidget `GetGtkWidget(self) -> long On wxGTK returns a pointer to the GtkWidget for this window as a long integer. On the other platforms this method returns zero.` Handle `See `GetHandle`` HelpText `See `GetHelpText` and `SetHelpText`` Id `See `GetId` and `SetId`` Label `See `GetLabel` and `SetLabel`` LayoutDirection `See `GetLayoutDirection` and `SetLayoutDirection`` MaxHeight `See `GetMaxHeight`` MaxSize `See `GetMaxSize` and `SetMaxSize`` MaxWidth `See `GetMaxWidth`` MinHeight `See `GetMinHeight`` MinSize `See `GetMinSize` and `SetMinSize`` MinWidth `See `GetMinWidth`` Name `See `GetName` and `SetName`` Parent `See `GetParent`` Position `See `GetPosition` and `SetPosition`` Rect `See `GetRect` and `SetRect`` ScreenPosition `See `GetScreenPosition`` ScreenRect `See `GetScreenRect`` Shown `See `IsShown` and `Show`` Size `See `GetSize` and `SetSize`` Sizer `See `GetSizer` and `SetSizer`` ThemeEnabled `See `GetThemeEnabled` and `SetThemeEnabled`` ToolTip `See `GetToolTip` and `SetToolTip`` TopLevel `See `IsTopLevel`` TopLevelParent `See `GetTopLevelParent`` UpdateClientRect `See `GetUpdateClientRect`` UpdateRegion `See `GetUpdateRegion`` Validator `See `GetValidator` and `SetValidator`` VirtualSize `See `GetVirtualSize` and `SetVirtualSize`` WindowStyle `See `GetWindowStyle` and `SetWindowStyle`` WindowStyleFlag `See `GetWindowStyleFlag` and `SetWindowStyleFlag`` WindowVariant `See `GetWindowVariant` and `SetWindowVariant`` Methods inherited from wx._core.EvtHandler: AddPendingEvent(*args, **kwargs) `AddPendingEvent(self, Event event)` Bind(self, event, handler, source=None, id=-1, id2=-1) `Bind an event to an event handler. :param event: One of the EVT_* objects that specifies the type of event to bind, :param handler: A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler. :param source: Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls. :param id: Used to spcify the event source by ID instead of instance. :param id2: Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.` Connect(*args, **kwargs) `Connect(self, int id, int lastId, int eventType, PyObject func)` Disconnect(*args, **kwargs) `Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL, PyObject func=None) -> bool` GetEvtHandlerEnabled(*args, **kwargs) `GetEvtHandlerEnabled(self) -> bool` GetNextHandler(*args, **kwargs) `GetNextHandler(self) -> EvtHandler` GetPreviousHandler(*args, **kwargs) `GetPreviousHandler(self) -> EvtHandler` ProcessEvent(*args, **kwargs) `ProcessEvent(self, Event event) -> bool` ProcessPendingEvents(*args, **kwargs) `ProcessPendingEvents(self)` SetEvtHandlerEnabled(*args, **kwargs) `SetEvtHandlerEnabled(self, bool enabled)` SetNextHandler(*args, **kwargs) `SetNextHandler(self, EvtHandler handler)` SetPreviousHandler(*args, **kwargs) `SetPreviousHandler(self, EvtHandler handler)` Unbind(self, event, source=None, id=-1, id2=-1, handler=None) `Disconnects the event handler binding for event from self. Returns True if successful.` Data descriptors inherited from wx._core.EvtHandler: EvtHandlerEnabled `See `GetEvtHandlerEnabled` and `SetEvtHandlerEnabled`` NextHandler `See `GetNextHandler` and `SetNextHandler`` PreviousHandler `See `GetPreviousHandler` and `SetPreviousHandler`` Methods inherited from wx._core.Object: GetClassName(*args, **kwargs) `GetClassName(self) -> String Returns the class name of the C++ class using wxRTTI.` IsSameAs(*args, **kwargs) `IsSameAs(self, Object p) -> bool For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.` Data descriptors inherited from wx._core.Object: ClassName `See `GetClassName`` __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`
class StatisticsTable(wx.grid.PyGridTableBase)
`` |  | Method resolution order: StatisticsTable wx.grid.PyGridTableBase wx.grid.GridTableBase wx._core.Object __builtin__.object Methods defined here: GetColLabelValue(self, col) GetNumberCols(self) GetNumberRows(self) GetRowLabelValue(self, row) GetValue(self, row, col) IsEmptyCell(self, row, col) SetValue(self, row, col, value) __init__(self, data=[[]], rowLabels=[], colLabels=[]) Methods inherited from wx.grid.PyGridTableBase: Destroy(*args, **kwargs) `Destroy(self) Deletes the C++ object this Python object is a proxy for.` __repr__ = _swig_repr(self) base_AppendCols = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.AppendCols instead.` base_AppendRows = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.AppendRows instead.` base_CanGetValueAs = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.CanGetValueAs instead.` base_CanHaveAttributes = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.CanHaveAttributes instead.` base_CanSetValueAs = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.CanSetValueAs instead.` base_Clear = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.Clear instead.` base_DeleteCols = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.DeleteCols instead.` base_DeleteRows = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.DeleteRows instead.` base_GetAttr = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.GetAttr instead.` base_GetColLabelValue = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.GetColLabelValue instead.` base_GetRowLabelValue = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.GetRowLabelValue instead.` base_GetTypeName = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.GetTypeName instead.` base_InsertCols = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.InsertCols instead.` base_InsertRows = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.InsertRows instead.` base_SetAttr = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.SetAttr instead.` base_SetColAttr = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.SetColAttr instead.` base_SetColLabelValue = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.SetColLabelValue instead.` base_SetRowAttr = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.SetRowAttr instead.` base_SetRowLabelValue = deprecatedWrapper(*args, **kwargs) `Please use PyGridTableBase.SetRowLabelValue instead.` Data descriptors inherited from wx.grid.PyGridTableBase: thisown `The membership flag` Methods inherited from wx.grid.GridTableBase: AppendCols(*args, **kwargs) `AppendCols(self, size_t numCols=1) -> bool` AppendRows(*args, **kwargs) `AppendRows(self, size_t numRows=1) -> bool` CanGetValueAs(*args, **kwargs) `CanGetValueAs(self, int row, int col, String typeName) -> bool` CanHaveAttributes(*args, **kwargs) `CanHaveAttributes(self) -> bool` CanSetValueAs(*args, **kwargs) `CanSetValueAs(self, int row, int col, String typeName) -> bool` Clear(*args, **kwargs) `Clear(self)` DeleteCols(*args, **kwargs) `DeleteCols(self, size_t pos=0, size_t numCols=1) -> bool` DeleteRows(*args, **kwargs) `DeleteRows(self, size_t pos=0, size_t numRows=1) -> bool` GetAttr(*args, **kwargs) `GetAttr(self, int row, int col, int kind) -> GridCellAttr` GetAttrProvider(*args, **kwargs) `GetAttrProvider(self) -> GridCellAttrProvider` GetTypeName(*args, **kwargs) `GetTypeName(self, int row, int col) -> String` GetValueAsBool(*args, **kwargs) `GetValueAsBool(self, int row, int col) -> bool` GetValueAsDouble(*args, **kwargs) `GetValueAsDouble(self, int row, int col) -> double` GetValueAsLong(*args, **kwargs) `GetValueAsLong(self, int row, int col) -> long` GetView(*args, **kwargs) `GetView(self) -> Grid` InsertCols(*args, **kwargs) `InsertCols(self, size_t pos=0, size_t numCols=1) -> bool` InsertRows(*args, **kwargs) `InsertRows(self, size_t pos=0, size_t numRows=1) -> bool` SetAttr(*args, **kwargs) `SetAttr(self, GridCellAttr attr, int row, int col)` SetAttrProvider(*args, **kwargs) `SetAttrProvider(self, GridCellAttrProvider attrProvider)` SetColAttr(*args, **kwargs) `SetColAttr(self, GridCellAttr attr, int col)` SetColLabelValue(*args, **kwargs) `SetColLabelValue(self, int col, String value)` SetRowAttr(*args, **kwargs) `SetRowAttr(self, GridCellAttr attr, int row)` SetRowLabelValue(*args, **kwargs) `SetRowLabelValue(self, int row, String value)` SetValueAsBool(*args, **kwargs) `SetValueAsBool(self, int row, int col, bool value)` SetValueAsDouble(*args, **kwargs) `SetValueAsDouble(self, int row, int col, double value)` SetValueAsLong(*args, **kwargs) `SetValueAsLong(self, int row, int col, long value)` SetView(*args, **kwargs) `SetView(self, Grid grid)` __del__ lambda self Data descriptors inherited from wx.grid.GridTableBase: AttrProvider `See `GetAttrProvider` and `SetAttrProvider`` NumberCols `See `GetNumberCols`` NumberRows `See `GetNumberRows`` View `See `GetView` and `SetView`` Data and other attributes inherited from wx.grid.GridTableBase: __swig_destroy__ = <built-in function delete_GridTableBase> Methods inherited from wx._core.Object: GetClassName(*args, **kwargs) `GetClassName(self) -> String Returns the class name of the C++ class using wxRTTI.` IsSameAs(*args, **kwargs) `IsSameAs(self, Object p) -> bool For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.` Data descriptors inherited from wx._core.Object: ClassName `See `GetClassName`` __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Functions
`` |  | add_docstring(...) `docstring(obj, docstring) Add a docstring to a built-in obj if possible. If the obj already has a docstring raise a RuntimeError If this routine does not know how to add a docstring to the object raise a TypeError` alterdot(...) `Change `dot`, `vdot`, and `innerproduct` to use accelerated BLAS functions. Typically, as a user of Numpy, you do not explicitly call this function. If Numpy is built with an accelerated BLAS, this function is automatically called when Numpy is imported. When Numpy is built with an accelerated BLAS like ATLAS, these functions are replaced to make use of the faster implementations. The faster implementations only affect float32, float64, complex64, and complex128 arrays. Furthermore, the BLAS API only includes matrix-matrix, matrix-vector, and vector-vector products. Products of arrays with larger dimensionalities use the built in functions and are not accelerated. See Also -------- restoredot : `restoredot` undoes the effects of `alterdot`.` arange(...) `arange([start,] stop[, step,], dtype=None) Return evenly spaced values within a given interval. Values are generated within the half-open interval ``[start, stop)`` (in other words, the interval including `start` but excluding `stop`). For integer arguments the function is equivalent to the Python built-in `range <http://docs.python.org/lib/built-in-funcs.html>`_ function, but returns a ndarray rather than a list. Parameters ---------- start : number, optional Start of interval. The interval includes this value. The default start value is 0. stop : number End of interval. The interval does not include this value. step : number, optional Spacing between values. For any output `out`, this is the distance between two adjacent values, ``out[i+1] - out[i]``. The default step size is 1. If `step` is specified, `start` must also be given. dtype : dtype The type of the output array. If `dtype` is not given, infer the data type from the other input arguments. Returns ------- out : ndarray Array of evenly spaced values. For floating point arguments, the length of the result is ``ceil((stop - start)/step)``. Because of floating point overflow, this rule may result in the last element of `out` being greater than `stop`. See Also -------- linspace : Evenly spaced numbers with careful handling of endpoints. ogrid: Arrays of evenly spaced numbers in N-dimensions mgrid: Grid-shaped arrays of evenly spaced numbers in N-dimensions Examples -------- >>> np.arange(3) array([0, 1, 2]) >>> np.arange(3.0) array([ 0., 1., 2.]) >>> np.arange(3,7) array([3, 4, 5, 6]) >>> np.arange(3,7,2) array([3, 5])` array(...) `array(object, dtype=None, copy=True, order=None, subok=False, ndmin=True) Create an array. Parameters ---------- object : array_like An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence. dtype : data-type, optional The desired data-type for the array. If not given, then the type will be determined as the minimum type required to hold the objects in the sequence. This argument can only be used to 'upcast' the array. For downcasting, use the .astype(t) method. copy : bool, optional If true (default), then the object is copied. Otherwise, a copy will only be made if __array__ returns a copy, if obj is a nested sequence, or if a copy is needed to satisfy any of the other requirements (`dtype`, `order`, etc.). order : {'C', 'F', 'A'}, optional Specify the order of the array. If order is 'C' (default), then the array will be in C-contiguous order (last-index varies the fastest). If order is 'F', then the returned array will be in Fortran-contiguous order (first-index varies the fastest). If order is 'A', then the returned array may be in any order (either C-, Fortran-contiguous, or even discontiguous). subok : bool, optional If True, then sub-classes will be passed-through, otherwise the returned array will be forced to be a base-class array (default). ndmin : int, optional Specifies the minimum number of dimensions that the resulting array should have. Ones will be pre-pended to the shape as needed to meet this requirement. Examples -------- >>> np.array([1, 2, 3]) array([1, 2, 3]) Upcasting: >>> np.array([1, 2, 3.0]) array([ 1., 2., 3.]) More than one dimension: >>> np.array([[1, 2], [3, 4]]) array([[1, 2], [3, 4]]) Minimum dimensions 2: >>> np.array([1, 2, 3], ndmin=2) array([[1, 2, 3]]) Type provided: >>> np.array([1, 2, 3], dtype=complex) array([ 1.+0.j, 2.+0.j, 3.+0.j]) Data-type consisting of more than one element: >>> x = np.array([(1,2),(3,4)],dtype=[('a','<i4'),('b','<i4')]) >>> x['a'] array([1, 3]) Creating an array from sub-classes: >>> np.array(np.mat('1 2; 3 4')) array([[1, 2], [3, 4]]) >>> np.array(np.mat('1 2; 3 4'), subok=True) matrix([[1, 2], [3, 4]])` beta(...) `beta(a, b, size=None) The Beta distribution over ``[0, 1]``. The Beta distribution is a special case of the Dirichlet distribution, and is related to the Gamma distribution. It has the probability distribution function .. math:: f(x; a,b) = \frac{1}{B(\alpha, \beta)} x^{\alpha - 1} (1 - x)^{\beta - 1}, where the normalisation, B, is the beta function, .. math:: B(\alpha, \beta) = \int_0^1 t^{\alpha - 1} (1 - t)^{\beta - 1} dt. It is often seen in Bayesian inference and order statistics. Parameters ---------- a : float Alpha, non-negative. b : float Beta, non-negative. size : tuple of ints, optional The number of samples to draw. The ouput is packed according to the size given. Returns ------- out : ndarray Array of the given shape, containing values drawn from a Beta distribution.` bincount(...) `bincount(x, weights=None) Return the number of occurrences of each value in array of nonnegative integers. The output, b[i], represents the number of times that i is found in `x`. If `weights` is specified, every occurrence of i at a position p contributes `weights` [p] instead of 1. Parameters ---------- x : array_like, 1 dimension, nonnegative integers Input array. weights : array_like, same shape as `x`, optional Weights. See Also -------- histogram, digitize, unique` binomial(...) `binomial(n, p, size=None) Draw samples from a binomial distribution. Samples are drawn from a Binomial distribution with specified parameters, n trials and p probability of success where n an integer > 0 and p is in the interval [0,1]. (n may be input as a float, but it is truncated to an integer in use) Parameters ---------- n : float (but truncated to an integer) parameter, > 0. p : float parameter, >= 0 and <=1. size : {tuple, int} Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. Returns ------- samples : {ndarray, scalar} where the values are all integers in [0, n]. See Also -------- scipy.stats.distributions.binom : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Binomial distribution is .. math:: P(N) = \binom{n}{N}p^N(1-p)^{n-N}, where :math:`n` is the number of trials, :math:`p` is the probability of success, and :math:`N` is the number of successes. When estimating the standard error of a proportion in a population by using a random sample, the normal distribution works well unless the product p*n <=5, where p = population proportion estimate, and n = number of samples, in which case the binomial distribution is used instead. For example, a sample of 15 people shows 4 who are left handed, and 11 who are right handed. Then p = 4/15 = 27%. 0.27*15 = 4, so the binomial distribution should be used in this case. References ---------- .. [1] Dalgaard, Peter, "Introductory Statistics with R", Springer-Verlag, 2002. .. [2] Glantz, Stanton A. "Primer of Biostatistics.", McGraw-Hill, Fifth Edition, 2002. .. [3] Lentner, Marvin, "Elementary Applied Statistics", Bogden and Quigley, 1972. .. [4] Weisstein, Eric W. "Binomial Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/BinomialDistribution.html .. [5] Wikipedia, "Binomial-distribution", http://en.wikipedia.org/wiki/Binomial_distribution Examples -------- Draw samples from the distribution: >>> n, p = 10, .5 # number of trials, probability of each trial >>> s = np.random.binomial(n, p, 1000) # result of flipping a coin 10 times, tested 1000 times. A real world example. A company drills 9 wild-cat oil exploration wells, each with an estimated probability of success of 0.1. All nine wells fail. What is the probability of that happening? Let's do 20,000 trials of the model, and count the number that generate zero positive results. >>> sum(np.random.binomial(9,0.1,20000)==0)/20000. answer = 0.38885, or 38%.` bytes(...) `bytes(length) Return random bytes. Parameters ---------- length : int Number of random bytes. Returns ------- out : str String of length `N`. Examples -------- >>> np.random.bytes(10) ' eh\x85\x022SZ\xbf\xa4' #random` can_cast(...) `can_cast(from=d1, to=d2) Returns True if cast between data types can occur without losing precision. Parameters ---------- from: data type code Data type code to cast from. to: data type code Data type code to cast to. Returns ------- out : bool True if cast can occur without losing precision.` chisquare(...) `chisquare(df, size=None) Draw samples from a chi-square distribution. When `df` independent random variables, each with standard normal distributions (mean 0, variance 1), are squared and summed, the resulting distribution is chi-square (see Notes). This distribution is often used in hypothesis testing. Parameters ---------- df : int Number of degrees of freedom. size : tuple of ints, int, optional Size of the returned array. By default, a scalar is returned. Returns ------- output : ndarray Samples drawn from the distribution, packed in a `size`-shaped array. Raises ------ ValueError When `df` <= 0 or when an inappropriate `size` (e.g. ``size=-1``) is given. Notes ----- The variable obtained by summing the squares of `df` independent, standard normally distributed random variables: .. math:: Q = \sum_{i=0}^{\mathtt{df}} X^2_i is chi-square distributed, denoted .. math:: Q \sim \chi^2_k. The probability density function of the chi-squared distribution is .. math:: p(x) = \frac{(1/2)^{k/2}}{\Gamma(k/2)} x^{k/2 - 1} e^{-x/2}, where :math:`\Gamma` is the gamma function, .. math:: \Gamma(x) = \int_0^{-\infty} t^{x - 1} e^{-t} dt. References ---------- .. [1] NIST/SEMATECH e-Handbook of Statistical Methods, http://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm .. [2] Wikipedia, "Chi-square distribution", http://en.wikipedia.org/wiki/Chi-square_distribution Examples -------- >>> np.random.chisquare(2,4) array([ 1.89920014, 9.00867716, 3.13710533, 5.62318272])` compare_chararrays(...) concatenate(...) `concatenate((a1, a2, ...), axis=0) Join a sequence of arrays together. Parameters ---------- a1, a2, ... : sequence of ndarrays The arrays must have the same shape, except in the dimension corresponding to `axis` (the first, by default). axis : int, optional The axis along which the arrays will be joined. Default is 0. Returns ------- res : ndarray The concatenated array. See Also -------- array_split : Split an array into multiple sub-arrays of equal or near-equal size. split : Split array into a list of multiple sub-arrays of equal size. hsplit : Split array into multiple sub-arrays horizontally (column wise) vsplit : Split array into multiple sub-arrays vertically (row wise) dsplit : Split array into multiple sub-arrays along the 3rd axis (depth). hstack : Stack arrays in sequence horizontally (column wise) vstack : Stack arrays in sequence vertically (row wise) dstack : Stack arrays in sequence depth wise (along third dimension) Examples -------- >>> a = np.array([[1, 2], [3, 4]]) >>> b = np.array([[5, 6]]) >>> np.concatenate((a, b), axis=0) array([[1, 2], [3, 4], [5, 6]]) >>> np.concatenate((a, b.T), axis=1) array([[1, 2, 5], [3, 4, 6]])` digitize(...) `digitize(x, bins) Return the indices of the bins to which each value in input array belongs. Each index returned is such that `bins[i-1]` <= `x` < `bins[i]` if `bins` is monotonically increasing, or `bins[i-1]` > `x` >= `bins[i]` if `bins` is monotonically decreasing. Beyond the bounds of `bins`, 0 or len(`bins`) is returned as appropriate. Parameters ---------- x : array_like Input array to be binned. bins : array_like Array of bins. Returns ------- out : ndarray Output array of indices of same shape as `x`. Examples -------- >>> x = np.array([0.2, 6.4, 3.0, 1.6]) >>> bins = np.array([0.0, 1.0, 2.5, 4.0, 10.0]) >>> d = np.digitize(x,bins) >>> d array([1, 4, 3, 2]) >>> for n in range(len(x)): ... print bins[d[n]-1], "<=", x[n], "<", bins[d[n]] ... 0.0 <= 0.2 < 1.0 4.0 <= 6.4 < 10.0 2.5 <= 3.0 < 4.0 1.0 <= 1.6 < 2.5` dot(...) `dot(a, b) Dot product of two arrays. For 2-D arrays it is equivalent to matrix multiplication, and for 1-D arrays to inner product of vectors (without complex conjugation). For N dimensions it is a sum product over the last axis of `a` and the second-to-last of `b`:: dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m]) Parameters ---------- a : array_like First argument. b : array_like Second argument. Returns ------- output : ndarray Returns the dot product of `a` and `b`. If `a` and `b` are both scalars or both 1-D arrays then a scalar is returned; otherwise an array is returned. Raises ------ ValueError If the last dimension of `a` is not the same size as the second-to-last dimension of `b`. See Also -------- vdot : Complex-conjugating dot product. tensordot : Sum products over arbitrary axes. Examples -------- >>> np.dot(3, 4) 12 Neither argument is complex-conjugated: >>> np.dot([2j, 3j], [2j, 3j]) (-13+0j) For 2-D arrays it's the matrix product: >>> a = [[1, 0], [0, 1]] >>> b = [[4, 1], [2, 2]] >>> np.dot(a, b) array([[4, 1], [2, 2]]) >>> a = np.arange(3*4*5*6).reshape((3,4,5,6)) >>> b = np.arange(3*4*5*6)[::-1].reshape((5,4,6,3)) >>> np.dot(a, b)[2,3,2,1,2,2] 499128 >>> sum(a[2,3,2,:] * b[1,2,:,2]) 499128` empty(...) `empty(shape, dtype=float, order='C') Return a new array of given shape and type, without initialising entries. Parameters ---------- shape : {tuple of int, int} Shape of the empty array dtype : data-type, optional Desired output data-type. order : {'C', 'F'}, optional Whether to store multi-dimensional data in C (row-major) or Fortran (column-major) order in memory. See Also -------- empty_like, zeros Notes ----- `empty`, unlike `zeros`, does not set the array values to zero, and may therefore be marginally faster. On the other hand, it requires the user to manually set all the values in the array, and should be used with caution. Examples -------- >>> np.empty([2, 2]) array([[ -9.74499359e+001, 6.69583040e-309], #random data [ 2.13182611e-314, 3.06959433e-309]]) >>> np.empty([2, 2], dtype=int) array([[-1073741821, -1067949133], #random data [ 496041986, 19249760]])` exponential(...) `exponential(scale=1.0, size=None) Exponential distribution. Its probability density function is .. math:: f(x; \frac{1}{\beta}) = \frac{1}{\beta} \exp(-\frac{x}{\beta}), for ``x > 0`` and 0 elsewhere. :math:`\beta` is the scale parameter, which is the inverse of the rate parameter :math:`\lambda = 1/\beta`. The rate parameter is an alternative, widely used parameterization of the exponential distribution [3]_. The exponential distribution is a continuous analogue of the geometric distribution. It describes many common situations, such as the size of raindrops measured over many rainstorms [1]_, or the time between page requests to Wikipedia [2]_. Parameters ---------- scale : float The scale parameter, :math:`\beta = 1/\lambda`. size : tuple of ints Number of samples to draw. The output is shaped according to `size`. References ---------- .. [1] Peyton Z. Peebles Jr., "Probability, Random Variables and Random Signal Principles", 4th ed, 2001, p. 57. .. [2] "Poisson Process", Wikipedia, http://en.wikipedia.org/wiki/Poisson_process .. [3] "Exponential Distribution, Wikipedia, http://en.wikipedia.org/wiki/Exponential_distribution` f(...) `f(dfnum, dfden, size=None) Draw samples from a F distribution. Samples are drawn from an F distribution with specified parameters, `dfnum` (degrees of freedom in numerator) and `dfden` (degrees of freedom in denominator), where both parameters should be greater than zero. The random variate of the F distribution (also known as the Fisher distribution) is a continuous probability distribution that arises in ANOVA tests, and is the ratio of two chi-square variates. Parameters ---------- dfnum : float Degrees of freedom in numerator. Should be greater than zero. dfden : float Degrees of freedom in denominator. Should be greater than zero. size : {tuple, int}, optional Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. By default only one sample is returned. Returns ------- samples : {ndarray, scalar} Samples from the Fisher distribution. See Also -------- scipy.stats.distributions.f : probability density function, distribution or cumulative density function, etc. Notes ----- The F statistic is used to compare in-group variances to between-group variances. Calculating the distribution depends on the sampling, and so it is a function of the respective degrees of freedom in the problem. The variable `dfnum` is the number of samples minus one, the between-groups degrees of freedom, while `dfden` is the within-groups degrees of freedom, the sum of the number of samples in each group minus the number of groups. References ---------- .. [1] Glantz, Stanton A. "Primer of Biostatistics.", McGraw-Hill, Fifth Edition, 2002. .. [2] Wikipedia, "F-distribution", http://en.wikipedia.org/wiki/F-distribution Examples -------- An example from Glantz[1], pp 47-40. Two groups, children of diabetics (25 people) and children from people without diabetes (25 controls). Fasting blood glucose was measured, case group had a mean value of 86.1, controls had a mean value of 82.2. Standard deviations were 2.09 and 2.49 respectively. Are these data consistent with the null hypothesis that the parents diabetic status does not affect their children's blood glucose levels? Calculating the F statistic from the data gives a value of 36.01. Draw samples from the distribution: >>> dfnum = 1. # between group degrees of freedom >>> dfden = 48. # within groups degrees of freedom >>> s = np.random.f(dfnum, dfden, 1000) The lower bound for the top 1% of the samples is : >>> sort(s)[-10] 7.61988120985 So there is about a 1% chance that the F statistic will exceed 7.62, the measured value is 36, so the null hypothesis is rejected at the 1% level.` fastCopyAndTranspose = _fastCopyAndTranspose(...) `_fastCopyAndTranspose(a)` frombuffer(...) `frombuffer(buffer, dtype=float, count=-1, offset=0) Interpret a buffer as a 1-dimensional array. Parameters ---------- buffer An object that exposes the buffer interface. dtype : data-type, optional Data type of the returned array. count : int, optional Number of items to read. ``-1`` means all data in the buffer. offset : int, optional Start reading the buffer from this offset. Notes ----- If the buffer has data that is not in machine byte-order, this should be specified as part of the data-type, e.g.:: >>> dt = np.dtype(int) >>> dt = dt.newbyteorder('>') >>> np.frombuffer(buf, dtype=dt) The data of the resulting array will not be byteswapped, but will be interpreted correctly. Examples -------- >>> s = 'hello world' >>> np.frombuffer(s, dtype='S1', count=5, offset=6) array(['w', 'o', 'r', 'l', 'd'], dtype='|S1')` fromfile(...) `fromfile(file, dtype=float, count=-1, sep='') Construct an array from data in a text or binary file. A highly efficient way of reading binary data with a known data-type, as well as parsing simply formatted text files. Data written using the `tofile` method can be read using this function. Parameters ---------- file : file or string Open file object or filename. dtype : data-type Data type of the returned array. For binary files, it is used to determine the size and byte-order of the items in the file. count : int Number of items to read. ``-1`` means all items (i.e., the complete file). sep : string Separator between items if file is a text file. Empty ("") separator means the file should be treated as binary. Spaces (" ") in the separator match zero or more whitespace characters. A separator consisting only of spaces must match at least one whitespace. See also -------- load, save ndarray.tofile loadtxt : More flexible way of loading data from a text file. Notes ----- Do not rely on the combination of `tofile` and `fromfile` for data storage, as the binary files generated are are not platform independent. In particular, no byte-order or data-type information is saved. Data can be stored in the platform independent ``.npy`` format using `save` and `load` instead. Examples -------- Construct an ndarray: >>> dt = np.dtype([('time', [('min', int), ('sec', int)]), ... ('temp', float)]) >>> x = np.zeros((1,), dtype=dt) >>> x['time']['min'] = 10; x['temp'] = 98.25 >>> x array([((10, 0), 98.25)], dtype=[('time', [('min', '<i4'), ('sec', '<i4')]), ('temp', '<f8')]) Save the raw data to disk: >>> import os >>> fname = os.tmpnam() >>> x.tofile(fname) Read the raw data from disk: >>> np.fromfile(fname, dtype=dt) array([((10, 0), 98.25)], dtype=[('time', [('min', '<i4'), ('sec', '<i4')]), ('temp', '<f8')]) The recommended way to store and load data: >>> np.save(fname, x) >>> np.load(fname + '.npy') array([((10, 0), 98.25)], dtype=[('time', [('min', '<i4'), ('sec', '<i4')]), ('temp', '<f8')])` fromiter(...) `fromiter(iterable, dtype, count=-1) Create a new 1-dimensional array from an iterable object. Parameters ---------- iterable : iterable object An iterable object providing data for the array. dtype : data-type The data type of the returned array. count : int, optional The number of items to read from iterable. The default is -1, which means all data is read. Returns ------- out : ndarray The output array. Notes ----- Specify ``count`` to improve performance. It allows ``fromiter`` to pre-allocate the output array, instead of resizing it on demand. Examples -------- >>> iterable = (x*x for x in range(5)) >>> np.fromiter(iterable, np.float) array([ 0., 1., 4., 9., 16.])` frompyfunc(...) `frompyfunc(func, nin, nout) take an arbitrary python function that takes nin objects as input and returns nout objects and return a universal function (ufunc). This ufunc always returns PyObject arrays` fromstring(...) `fromstring(string, dtype=float, count=-1, sep='') Return a new 1d array initialized from raw binary or text data in string. Parameters ---------- string : str A string containing the data. dtype : dtype, optional The data type of the array. For binary input data, the data must be in exactly this format. count : int, optional Read this number of `dtype` elements from the data. If this is negative, then the size will be determined from the length of the data. sep : str, optional If provided and not empty, then the data will be interpreted as ASCII text with decimal numbers. This argument is interpreted as the string separating numbers in the data. Extra whitespace between elements is also ignored. Returns ------- arr : array The constructed array. Raises ------ ValueError If the string is not the correct size to satisfy the requested `dtype` and `count`. Examples -------- >>> np.fromstring('\x01\x02', dtype=np.uint8) array([1, 2], dtype=uint8) >>> np.fromstring('1 2', dtype=int, sep=' ') array([1, 2]) >>> np.fromstring('1, 2', dtype=int, sep=',') array([1, 2]) >>> np.fromstring('\x01\x02\x03\x04\x05', dtype=np.uint8, count=3) array([1, 2, 3], dtype=uint8) Invalid inputs: >>> np.fromstring('\x01\x02\x03\x04\x05', dtype=np.int32) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: string size must be a multiple of element size >>> np.fromstring('\x01\x02', dtype=np.uint8, count=3) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: string is smaller than requested size` gamma(...) `gamma(shape, scale=1.0, size=None) Draw samples from a Gamma distribution. Samples are drawn from a Gamma distribution with specified parameters, `shape` (sometimes designated "k") and `scale` (sometimes designated "theta"), where both parameters are > 0. Parameters ---------- shape : scalar > 0 The shape of the gamma distribution. scale : scalar > 0, optional The scale of the gamma distribution. Default is equal to 1. size : shape_tuple, optional Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. Returns ------- out : ndarray, float Returns one sample unless `size` parameter is specified. See Also -------- scipy.stats.distributions.gamma : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Gamma distribution is .. math:: p(x) = x^{k-1}\frac{e^{-x/\theta}}{\theta^k\Gamma(k)}, where :math:`k` is the shape and :math:`\theta` the scale, and :math:`\Gamma` is the Gamma function. The Gamma distribution is often used to model the times to failure of electronic components, and arises naturally in processes for which the waiting times between Poisson distributed events are relevant. References ---------- .. [1] Weisstein, Eric W. "Gamma Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/GammaDistribution.html .. [2] Wikipedia, "Gamma-distribution", http://en.wikipedia.org/wiki/Gamma-distribution Examples -------- Draw samples from the distribution: >>> shape, scale = 2., 2. # mean and dispersion >>> s = np.random.gamma(shape, scale, 1000) Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> import scipy.special as sps >>> count, bins, ignored = plt.hist(s, 50, normed=True) >>> y = bins**(shape-1)*((exp(-bins/scale))/\ (sps.gamma(shape)*scale**shape)) >>> plt.plot(bins, y, linewidth=2, color='r') >>> plt.show()` geometric(...) `geometric(p, size=None) Draw samples from the geometric distribution. Bernoulli trials are experiments with one of two outcomes: success or failure (an example of such an experiment is flipping a coin). The geometric distribution models the number of trials that must be run in order to achieve success. It is therefore supported on the positive integers, ``k = 1, 2, ...``. The probability mass function of the geometric distribution is .. math:: f(k) = (1 - p)^{k - 1} p where `p` is the probability of success of an individual trial. Parameters ---------- p : float The probability of success of an individual trial. size : tuple of ints Number of values to draw from the distribution. The output is shaped according to `size`. Returns ------- out : ndarray Samples from the geometric distribution, shaped according to `size`. Examples -------- Draw ten thousand values from the geometric distribution, with the probability of an individual success equal to 0.35: >>> z = np.random.geometric(p=0.35, size=10000) How many trials succeeded after a single run? >>> (z == 1).sum() / 10000. 0.34889999999999999 #random` get_state(...) `get_state() Return a tuple representing the internal state of the generator. Returns ------- out : tuple(string, list of 624 integers, int, int, float) The returned tuple has the following items: 1. the string 'MT19937' 2. a list of 624 integer keys 3. an integer pos 4. an integer has_gauss 5. and a float cached_gaussian See Also -------- set_state` getbuffer(...) `getbuffer(obj [,offset[, size]]) Create a buffer object from the given object referencing a slice of length size starting at offset. Default is the entire buffer. A read-write buffer is attempted followed by a read-only buffer.` geterrobj(...) `geterrobj() Used internally by `geterr`. Returns ------- errobj : list Internal numpy buffer size, error mask, error callback function.` gumbel(...) `gumbel(loc=0.0, scale=1.0, size=None) Gumbel distribution. Draw samples from a Gumbel distribution with specified location (or mean) and scale (or standard deviation). The Gumbel (or Smallest Extreme Value (SEV) or the Smallest Extreme Value Type I) distribution is one of a class of Generalized Extreme Value (GEV) distributions used in modeling extreme value problems. The Gumbel is a special case of the Extreme Value Type I distribution for maximums from distributions with "exponential-like" tails, it may be derived by considering a Gaussian process of measurements, and generating the pdf for the maximum values from that set of measurements (see examples). Parameters ---------- loc : float The location of the mode of the distribution. scale : float The scale parameter of the distribution. size : tuple of ints Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. See Also -------- scipy.stats.gumbel : probability density function, distribution or cumulative density function, etc. weibull, scipy.stats.genextreme Notes ----- The probability density for the Gumbel distribution is .. math:: p(x) = \frac{e^{-(x - \mu)/ \beta}}{\beta} e^{ -e^{-(x - \mu)/ \beta}}, where :math:`\mu` is the mode, a location parameter, and :math:`\beta` is the scale parameter. The Gumbel (named for German mathematician Emil Julius Gumbel) was used very early in the hydrology literature, for modeling the occurrence of flood events. It is also used for modeling maximum wind speed and rainfall rates. It is a "fat-tailed" distribution - the probability of an event in the tail of the distribution is larger than if one used a Gaussian, hence the surprisingly frequent occurrence of 100-year floods. Floods were initially modeled as a Gaussian process, which underestimated the frequency of extreme events. It is one of a class of extreme value distributions, the Generalized Extreme Value (GEV) distributions, which also includes the Weibull and Frechet. The function has a mean of :math:`\mu + 0.57721\beta` and a variance of :math:`\frac{\pi^2}{6}\beta^2`. References ---------- .. [1] Gumbel, E.J. (1958). Statistics of Extremes. Columbia University Press. .. [2] Reiss, R.-D. and Thomas M. (2001), Statistical Analysis of Extreme Values, from Insurance, Finance, Hydrology and Other Fields, Birkhauser Verlag, Basel: Boston : Berlin. .. [3] Wikipedia, "Gumbel distribution", http://en.wikipedia.org/wiki/Gumbel_distribution Examples -------- Draw samples from the distribution: >>> mu, beta = 0, 0.1 # location and scale >>> s = np.random.gumbel(mu, beta, 1000) Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, 30, normed=True) >>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta) ... * np.exp( -np.exp( -(bins - mu) /beta) ), ... linewidth=2, color='r') >>> plt.show() Show how an extreme value distribution can arise from a Gaussian process and compare to a Gaussian: >>> means = [] >>> maxima = [] >>> for i in range(0,1000) : ... a = np.random.normal(mu, beta, 1000) ... means.append(a.mean()) ... maxima.append(a.max()) >>> count, bins, ignored = plt.hist(maxima, 30, normed=True) >>> beta = np.std(maxima)*np.pi/np.sqrt(6) >>> mu = np.mean(maxima) - 0.57721*beta >>> plt.plot(bins, (1/beta)*np.exp(-(bins - mu)/beta) ... * np.exp(-np.exp(-(bins - mu)/beta)), ... linewidth=2, color='r') >>> plt.plot(bins, 1/(beta * np.sqrt(2 * np.pi)) ... * np.exp(-(bins - mu)**2 / (2 * beta**2)), ... linewidth=2, color='g') >>> plt.show()` hypergeometric(...) `hypergeometric(ngood, nbad, nsample, size=None) Draw samples from a Hypergeometric distribution. Samples are drawn from a Hypergeometric distribution with specified parameters, ngood (ways to make a good selection), nbad (ways to make a bad selection), and nsample = number of items sampled, which is less than or equal to the sum ngood + nbad. Parameters ---------- ngood : float (but truncated to an integer) parameter, > 0. nbad : float parameter, >= 0. nsample : float parameter, > 0 and <= ngood+nbad size : {tuple, int} Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. Returns ------- samples : {ndarray, scalar} where the values are all integers in [0, n]. See Also -------- scipy.stats.distributions.hypergeom : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Hypergeometric distribution is .. math:: P(x) = \frac{\binom{m}{n}\binom{N-m}{n-x}}{\binom{N}{n}}, where :math:`0 \le x \le m` and :math:`n+m-N \le x \le n` for P(x) the probability of x successes, n = ngood, m = nbad, and N = number of samples. Consider an urn with black and white marbles in it, ngood of them black and nbad are white. If you draw nsample balls without replacement, then the Hypergeometric distribution describes the distribution of black balls in the drawn sample. Note that this distribution is very similar to the Binomial distribution, except that in this case, samples are drawn without replacement, whereas in the Binomial case samples are drawn with replacement (or the sample space is infinite). As the sample space becomes large, this distribution approaches the Binomial. References ---------- .. [1] Lentner, Marvin, "Elementary Applied Statistics", Bogden and Quigley, 1972. .. [2] Weisstein, Eric W. "Hypergeometric Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/HypergeometricDistribution.html .. [3] Wikipedia, "Hypergeometric-distribution", http://en.wikipedia.org/wiki/Hypergeometric-distribution Examples -------- Draw samples from the distribution: >>> ngood, nbad, nsamp = 100, 2, 10 # number of good, number of bad, and number of samples >>> s = np.random.hypergeometric(ngood, nbad, nsamp, 1000) >>> hist(s) # note that it is very unlikely to grab both bad items Suppose you have an urn with 15 white and 15 black marbles. If you pull 15 marbles at random, how likely is it that 12 or more of them are one color? >>> s = np.random.hypergeometric(15, 15, 15, 100000) >>> sum(s>=12)/100000. + sum(s<=3)/100000. # answer = 0.003 ... pretty unlikely!` inner(...) `inner(a, b) Inner product of two arrays. Ordinary inner product of vectors for 1-D arrays (without complex conjugation), in higher dimensions a sum product over the last axes. Parameters ---------- a, b : array_like If `a` and `b` are nonscalar, their last dimensions of must match. Returns ------- out : ndarray `out.shape = a.shape[:-1] + b.shape[:-1]` Raises ------ ValueError If the last dimension of `a` and `b` has different size. See Also -------- tensordot : Sum products over arbitrary axes. dot : Generalised matrix product, using second last dimension of `b`. Notes ----- For vectors (1-D arrays) it computes the ordinary inner-product:: np.inner(a, b) = sum(a[:]*b[:]) More generally, if `ndim(a) = r > 0` and `ndim(b) = s > 0`:: np.inner(a, b) = np.tensordot(a, b, axes=(-1,-1)) or explicitly:: np.inner(a, b)[i0,...,ir-1,j0,...,js-1] = sum(a[i0,...,ir-1,:]*b[j0,...,js-1,:]) In addition `a` or `b` may be scalars, in which case:: np.inner(a,b) = a*b Examples -------- Ordinary inner product for vectors: >>> a = np.array([1,2,3]) >>> b = np.array([0,1,0]) >>> np.inner(a, b) 2 A multidimensional example: >>> a = np.arange(24).reshape((2,3,4)) >>> b = np.arange(4) >>> np.inner(a, b) array([[ 14, 38, 62], [ 86, 110, 134]]) An example where `b` is a scalar: >>> np.inner(np.eye(2), 7) array([[ 7., 0.], [ 0., 7.]])` int_asbuffer(...) laplace(...) `laplace(loc=0.0, scale=1.0, size=None) Laplace or double exponential distribution. It has the probability density function .. math:: f(x; \mu, \lambda) = \frac{1}{2\lambda} \exp\left(-\frac{|x - \mu|}{\lambda}\right). The Laplace distribution is similar to the Gaussian/normal distribution, but is sharper at the peak and has fatter tails. Parameters ---------- loc : float The position, :math:`\mu`, of the distribution peak. scale : float :math:`\lambda`, the exponential decay.` lexsort(...) `lexsort(keys, axis=-1) Perform an indirect sort using a sequence of keys. Given multiple sorting keys, which can be interpreted as columns in a spreadsheet, lexsort returns an array of integer indices that describes the sort order by multiple columns. The last key in the sequence is used for the primary sort order, the second-to-last key for the secondary sort order, and so on. The keys argument must be a sequence of objects that can be converted to arrays of the same shape. If a 2D array is provided for the keys argument, it's rows are interpreted as the sorting keys and sorting is according to the last row, second last row etc. Parameters ---------- keys : (k,N) array or tuple containing k (N,)-shaped sequences The `k` different "columns" to be sorted. The last column (or row if `keys` is a 2D array) is the primary sort key. axis : int, optional Axis to be indirectly sorted. By default, sort over the last axis. Returns ------- indices : (N,) ndarray of ints Array of indices that sort the keys along the specified axis. See Also -------- argsort : Indirect sort. ndarray.sort : In-place sort. sort : Return a sorted copy of an array. Examples -------- Sort names: first by surname, then by name. >>> surnames = ('Hertz', 'Galilei', 'Hertz') >>> first_names = ('Heinrich', 'Galileo', 'Gustav') >>> ind = np.lexsort((first_names, surnames)) >>> ind array([1, 2, 0]) >>> [surnames[i] + ", " + first_names[i] for i in ind] ['Galilei, Galileo', 'Hertz, Gustav', 'Hertz, Heinrich'] Sort two columns of numbers: >>> a = [1,5,1,4,3,4,4] # First column >>> b = [9,4,0,4,0,2,1] # Second column >>> ind = np.lexsort((b,a)) # Sort by a, then by b >>> print ind [2 0 4 6 5 3 1] >>> [(a[i],b[i]) for i in ind] [(1, 0), (1, 9), (3, 0), (4, 1), (4, 2), (4, 4), (5, 4)] Note that sorting is first according to the elements of ``a``. Secondary sorting is according to the elements of ``b``. A normal ``argsort`` would have yielded: >>> [(a[i],b[i]) for i in np.argsort(a)] [(1, 9), (1, 0), (3, 0), (4, 4), (4, 2), (4, 1), (5, 4)] Structured arrays are sorted lexically by ``argsort``: >>> x = np.array([(1,9), (5,4), (1,0), (4,4), (3,0), (4,2), (4,1)], ... dtype=np.dtype([('x', int), ('y', int)])) >>> np.argsort(x) # or np.argsort(x, order=('x', 'y')) array([2, 0, 4, 6, 5, 3, 1])` loads(...) `loads(string) -- Load a pickle from the given string` logistic(...) `logistic(loc=0.0, scale=1.0, size=None) Draw samples from a Logistic distribution. Samples are drawn from a Logistic distribution with specified parameters, loc (location or mean, also median), and scale (>0). Parameters ---------- loc : float scale : float > 0. size : {tuple, int} Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. Returns ------- samples : {ndarray, scalar} where the values are all integers in [0, n]. See Also -------- scipy.stats.distributions.logistic : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Logistic distribution is .. math:: P(x) = P(x) = \frac{e^{-(x-\mu)/s}}{s(1+e^{-(x-\mu)/s})^2}, where :math:`\mu` = location and :math:`s` = scale. The Logistic distribution is used in Extreme Value problems where it can act as a mixture of Gumbel distributions, in Epidemiology, and by the World Chess Federation (FIDE) where it is used in the Elo ranking system, assuming the performance of each player is a logistically distributed random variable. References ---------- .. [1] Reiss, R.-D. and Thomas M. (2001), Statistical Analysis of Extreme Values, from Insurance, Finance, Hydrology and Other Fields, Birkhauser Verlag, Basel, pp 132-133. .. [2] Weisstein, Eric W. "Logistic Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/LogisticDistribution.html .. [3] Wikipedia, "Logistic-distribution", http://en.wikipedia.org/wiki/Logistic-distribution Examples -------- Draw samples from the distribution: >>> loc, scale = 10, 1 >>> s = np.random.logistic(loc, scale, 10000) >>> count, bins, ignored = plt.hist(s, bins=50) # plot against distribution >>> def logist(x, loc, scale): ... return exp((loc-x)/scale)/(scale*(1+exp((loc-x)/scale))**2) >>> plt.plot(bins, logist(bins, loc, scale)*count.max()/\ ... logist(bins, loc, scale).max()) >>> plt.show()` lognormal(...) `lognormal(mean=0.0, sigma=1.0, size=None) Return samples drawn from a log-normal distribution. Draw samples from a log-normal distribution with specified mean, standard deviation, and shape. Note that the mean and standard deviation are not the values for the distribution itself, but of the underlying normal distribution it is derived from. Parameters ---------- mean : float Mean value of the underlying normal distribution sigma : float, >0. Standard deviation of the underlying normal distribution size : tuple of ints Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. See Also -------- scipy.stats.lognorm : probability density function, distribution, cumulative density function, etc. Notes ----- A variable `x` has a log-normal distribution if `log(x)` is normally distributed. The probability density function for the log-normal distribution is .. math:: p(x) = \frac{1}{\sigma x \sqrt{2\pi}} e^{(-\frac{(ln(x)-\mu)^2}{2\sigma^2})} where :math:`\mu` is the mean and :math:`\sigma` is the standard deviation of the normally distributed logarithm of the variable. A log-normal distribution results if a random variable is the *product* of a large number of independent, identically-distributed variables in the same way that a normal distribution results if the variable is the *sum* of a large number of independent, identically-distributed variables (see the last example). It is one of the so-called "fat-tailed" distributions. The log-normal distribution is commonly used to model the lifespan of units with fatigue-stress failure modes. Since this includes most mechanical systems, the log-normal distribution has widespread application. It is also commonly used to model oil field sizes, species abundance, and latent periods of infectious diseases. References ---------- .. [1] Eckhard Limpert, Werner A. Stahel, and Markus Abbt, "Log-normal Distributions across the Sciences: Keys and Clues", May 2001 Vol. 51 No. 5 BioScience http://stat.ethz.ch/~stahel/lognormal/bioscience.pdf .. [2] Reiss, R.D., Thomas, M.(2001), Statistical Analysis of Extreme Values, Birkhauser Verlag, Basel, pp 31-32. .. [3] Wikipedia, "Lognormal distribution", http://en.wikipedia.org/wiki/Lognormal_distribution Examples -------- Draw samples from the distribution: >>> mu, sigma = 3., 1. # mean and standard deviation >>> s = np.random.lognormal(mu, sigma, 1000) Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, 100, normed=True, align='center') >>> x = np.linspace(min(bins), max(bins), 10000) >>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2)) ... / (x * sigma * np.sqrt(2 * np.pi))) >>> plt.plot(x, pdf, linewidth=2, color='r') >>> plt.axis('tight') >>> plt.show() Demonstrate that taking the products of random samples from a uniform distribution can be fit well by a log-normal probability density function. >>> # Generate a thousand samples: each is the product of 100 random >>> # values, drawn from a normal distribution. >>> b = [] >>> for i in range(1000): ... a = 10. + np.random.random(100) ... b.append(np.product(a)) >>> b = np.array(b) / np.min(b) # scale values to be positive >>> count, bins, ignored = plt.hist(b, 100, normed=True, align='center') >>> sigma = np.std(np.log(b)) >>> mu = np.mean(np.log(b)) >>> x = np.linspace(min(bins), max(bins), 10000) >>> pdf = (np.exp(-(np.log(x) - mu)**2 / (2 * sigma**2)) ... / (x * sigma * np.sqrt(2 * np.pi))) >>> plt.plot(x, pdf, color='r', linewidth=2) >>> plt.show()` logseries(...) `logseries(p, size=None) Draw samples from a Logarithmic Series distribution. Samples are drawn from a Log Series distribution with specified parameter, p (probability, 0 < p < 1). Parameters ---------- loc : float scale : float > 0. size : {tuple, int} Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. Returns ------- samples : {ndarray, scalar} where the values are all integers in [0, n]. See Also -------- scipy.stats.distributions.logser : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Log Series distribution is .. math:: P(k) = \frac{-p^k}{k \ln(1-p)}, where p = probability. The Log Series distribution is frequently used to represent species richness and occurrence, first proposed by Fisher, Corbet, and Williams in 1943 [2]. It may also be used to model the numbers of occupants seen in cars [3]. References ---------- .. [1] Buzas, Martin A.; Culver, Stephen J., Understanding regional species diversity through the log series distribution of occurrences: BIODIVERSITY RESEARCH Diversity & Distributions, Volume 5, Number 5, September 1999 , pp. 187-195(9). .. [2] Fisher, R.A,, A.S. Corbet, and C.B. Williams. 1943. The relation between the number of species and the number of individuals in a random sample of an animal population. Journal of Animal Ecology, 12:42-58. .. [3] D. J. Hand, F. Daly, D. Lunn, E. Ostrowski, A Handbook of Small Data Sets, CRC Press, 1994. .. [4] Wikipedia, "Logarithmic-distribution", http://en.wikipedia.org/wiki/Logarithmic-distribution Examples -------- Draw samples from the distribution: >>> a = .6 >>> s = np.random.logseries(a, 10000) >>> count, bins, ignored = plt.hist(s) # plot against distribution >>> def logseries(k, p): ... return -p**k/(k*log(1-p)) >>> plt.plot(bins, logseries(bins, a)*count.max()/\ logseries(bins, a).max(),'r') >>> plt.show()` multinomial(...) `multinomial(n, pvals, size=None) Draw samples from a multinomial distribution. The multinomial distribution is a multivariate generalisation of the binomial distribution. Take an experiment with one of ``p`` possible outcomes. An example of such an experiment is throwing a dice, where the outcome can be 1 through 6. Each sample drawn from the distribution represents `n` such experiments. Its values, ``X_i = [X_0, X_1, ..., X_p]``, represent the number of times the outcome was ``i``. Parameters ---------- n : int Number of experiments. pvals : sequence of floats, length p Probabilities of each of the ``p`` different outcomes. These should sum to 1 (however, the last element is always assumed to account for the remaining probability, as long as ``sum(pvals[:-1]) <= 1)``. size : tuple of ints Given a `size` of ``(M, N, K)``, then ``M*N*K`` samples are drawn, and the output shape becomes ``(M, N, K, p)``, since each sample has shape ``(p,)``. Examples -------- Throw a dice 20 times: >>> np.random.multinomial(20, [1/6.]*6, size=1) array([[4, 1, 7, 5, 2, 1]]) It landed 4 times on 1, once on 2, etc. Now, throw the dice 20 times, and 20 times again: >>> np.random.multinomial(20, [1/6.]*6, size=2) array([[3, 4, 3, 3, 4, 3], [2, 4, 3, 4, 0, 7]]) For the first run, we threw 3 times 1, 4 times 2, etc. For the second, we threw 2 times 1, 4 times 2, etc. A loaded dice is more likely to land on number 6: >>> np.random.multinomial(100, [1/7.]*5) array([13, 16, 13, 16, 42])` multivariate_normal(...) `multivariate_normal(mean, cov[, size]) Draw random samples from a multivariate normal distribution. The multivariate normal, multinormal or Gaussian distribution is a generalisation of the one-dimensional normal distribution to higher dimensions. Such a distribution is specified by its mean and covariance matrix, which are analogous to the mean (average or "centre") and variance (standard deviation squared or "width") of the one-dimensional normal distribution. Parameters ---------- mean : (N,) ndarray Mean of the N-dimensional distribution. cov : (N,N) ndarray Covariance matrix of the distribution. size : tuple of ints, optional Given a shape of, for example, (m,n,k), m*n*k samples are generated, and packed in an m-by-n-by-k arrangement. Because each sample is N-dimensional, the output shape is (m,n,k,N). If no shape is specified, a single sample is returned. Returns ------- out : ndarray The drawn samples, arranged according to `size`. If the shape given is (m,n,...), then the shape of `out` is is (m,n,...,N). In other words, each entry ``out[i,j,...,:]`` is an N-dimensional value drawn from the distribution. Notes ----- The mean is a coordinate in N-dimensional space, which represents the location where samples are most likely to be generated. This is analogous to the peak of the bell curve for the one-dimensional or univariate normal distribution. Covariance indicates the level to which two variables vary together. From the multivariate normal distribution, we draw N-dimensional samples, :math:`X = [x_1, x_2, ... x_N]`. The covariance matrix element :math:`C_{ij}` is the covariance of :math:`x_i` and :math:`x_j`. The element :math:`C_{ii}` is the variance of :math:`x_i` (i.e. its "spread"). Instead of specifying the full covariance matrix, popular approximations include: - Spherical covariance (`cov` is a multiple of the identity matrix) - Diagonal covariance (`cov` has non-negative elements, and only on the diagonal) This geometrical property can be seen in two dimensions by plotting generated data-points: >>> mean = [0,0] >>> cov = [[1,0],[0,100]] # diagonal covariance, points lie on x or y-axis >>> import matplotlib.pyplot as plt >>> x,y = np.random.multivariate_normal(mean,cov,5000).T >>> plt.plot(x,y,'x'); plt.axis('equal'); plt.show() Note that the covariance matrix must be non-negative definite. References ---------- .. [1] A. Papoulis, "Probability, Random Variables, and Stochastic Processes," 3rd ed., McGraw-Hill Companies, 1991 .. [2] R.O. Duda, P.E. Hart, and D.G. Stork, "Pattern Classification," 2nd ed., Wiley, 2001. Examples -------- >>> mean = (1,2) >>> cov = [[1,0],[1,0]] >>> x = np.random.multivariate_normal(mean,cov,(3,3)) >>> x.shape (3, 3, 2) The following is probably true, given that 0.6 is roughly twice the standard deviation: >>> print list( (x[0,0,:] - mean) < 0.6 ) [True, True]` negative_binomial(...) `negative_binomial(n, p, size=None) Negative Binomial distribution.` newbuffer(...) `newbuffer(size) Return a new uninitialized buffer object of size bytes` noncentral_chisquare(...) `noncentral_chisquare(df, nonc, size=None) Draw samples from a noncentral chi-square distribution. The noncentral :math:`\chi^2` distribution is a generalisation of the :math:`\chi^2` distribution. Parameters ---------- df : int Degrees of freedom. nonc : float Non-centrality. size : tuple of ints Shape of the output.` noncentral_f(...) `noncentral_f(dfnum, dfden, nonc, size=None) Noncentral F distribution.` normal(...) `normal(loc=0.0, scale=1.0, size=None) Draw random samples from a normal (Gaussian) distribution. The probability density function of the normal distribution, first derived by De Moivre and 200 years later by both Gauss and Laplace independently [2]_, is often called the bell curve because of its characteristic shape (see the example below). The normal distributions occurs often in nature. For example, it describes the commonly occurring distribution of samples influenced by a large number of tiny, random disturbances, each with its own unique distribution [2]_. Parameters ---------- loc : float Mean ("centre") of the distribution. scale : float Standard deviation (spread or "width") of the distribution. size : tuple of ints Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. See Also -------- scipy.stats.distributions.norm : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Gaussian distribution is .. math:: p(x) = \frac{1}{\sqrt{ 2 \pi \sigma^2 }} e^{ - \frac{ (x - \mu)^2 } {2 \sigma^2} }, where :math:`\mu` is the mean and :math:`\sigma` the standard deviation. The square of the standard deviation, :math:`\sigma^2`, is called the variance. The function has its peak at the mean, and its "spread" increases with the standard deviation (the function reaches 0.607 times its maximum at :math:`x + \sigma` and :math:`x - \sigma` [2]_). This implies that `numpy.random.normal` is more likely to return samples lying close to the mean, rather than those far away. References ---------- .. [1] Wikipedia, "Normal distribution", http://en.wikipedia.org/wiki/Normal_distribution .. [2] P. R. Peebles Jr., "Central Limit Theorem" in "Probability, Random Variables and Random Signal Principles", 4th ed., 2001, pp. 51, 51, 125. Examples -------- Draw samples from the distribution: >>> mu, sigma = 0, 0.1 # mean and standard deviation >>> s = np.random.normal(mu, sigma, 1000) Verify the mean and the variance: >>> abs(mu - np.mean(s)) < 0.01 True >>> abs(sigma - np.std(s, ddof=1)) < 0.01 True Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, 30, normed=True) >>> plt.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) * ... np.exp( - (bins - mu)**2 / (2 * sigma**2) ), ... linewidth=2, color='r') >>> plt.show()` packbits(...) `packbits(myarray, axis=None) Packs the elements of a binary-valued array into bits in a uint8 array. The result is padded to full bytes by inserting zero bits at the end. Parameters ---------- myarray : array_like An integer type array whose elements should be packed to bits. axis : int, optional The dimension over which bit-packing is done. ``None`` implies packing the flattened array. Returns ------- packed : ndarray Array of type uint8 whose elements represent bits corresponding to the logical (0 or nonzero) value of the input elements. The shape of `packed` has the same number of dimensions as the input (unless `axis` is None, in which case the output is 1-D). See Also -------- unpackbits: Unpacks elements of a uint8 array into a binary-valued output array. Examples -------- >>> a = np.array([[[1,0,1], ... [0,1,0]], ... [[1,1,0], ... [0,0,1]]]) >>> b = np.packbits(a, axis=-1) >>> b array([[[160],[64]],[[192],[32]]], dtype=uint8) Note that in binary 160 = 1010 0000, 64 = 0100 0000, 192 = 1100 0000, and 32 = 0010 0000.` pareto(...) `pareto(a, size=None) Draw samples from a Pareto distribution with specified shape. This is a simplified version of the Generalized Pareto distribution (available in SciPy), with the scale set to one and the location set to zero. Most authors default the location to one. The Pareto distribution must be greater than zero, and is unbounded above. It is also known as the "80-20 rule". In this distribution, 80 percent of the weights are in the lowest 20 percent of the range, while the other 20 percent fill the remaining 80 percent of the range. Parameters ---------- shape : float, > 0. Shape of the distribution. size : tuple of ints Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. See Also -------- scipy.stats.distributions.genpareto.pdf : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Pareto distribution is .. math:: p(x) = \frac{am^a}{x^{a+1}} where :math:`a` is the shape and :math:`m` the location The Pareto distribution, named after the Italian economist Vilfredo Pareto, is a power law probability distribution useful in many real world problems. Outside the field of economics it is generally referred to as the Bradford distribution. Pareto developed the distribution to describe the distribution of wealth in an economy. It has also found use in insurance, web page access statistics, oil field sizes, and many other problems, including the download frequency for projects in Sourceforge [1]. It is one of the so-called "fat-tailed" distributions. References ---------- .. [1] Francis Hunt and Paul Johnson, On the Pareto Distribution of Sourceforge projects. .. [2] Pareto, V. (1896). Course of Political Economy. Lausanne. .. [3] Reiss, R.D., Thomas, M.(2001), Statistical Analysis of Extreme Values, Birkhauser Verlag, Basel, pp 23-30. .. [4] Wikipedia, "Pareto distribution", http://en.wikipedia.org/wiki/Pareto_distribution Examples -------- Draw samples from the distribution: >>> a, m = 3., 1. # shape and mode >>> s = np.random.pareto(a, 1000) + m Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, 100, normed=True, align='center') >>> fit = a*m**a/bins**(a+1) >>> plt.plot(bins, max(count)*fit/max(fit),linewidth=2, color='r') >>> plt.show()` permutation(...) `permutation(x) Randomly permute a sequence, or return a permuted range. Parameters ---------- x : int or array_like If `x` is an integer, randomly permute ``np.arange(x)``. If `x` is an array, make a copy and shuffle the elements randomly. Returns ------- out : ndarray Permuted sequence or array range. Examples -------- >>> np.random.permutation(10) array([1, 7, 4, 3, 0, 9, 2, 5, 8, 6]) >>> np.random.permutation([1, 4, 9, 12, 15]) array([15, 1, 9, 4, 12])` poisson(...) `poisson(lam=1.0, size=None) Poisson distribution.` power(...) `power(a, size=None) Power distribution.` putmask(...) `putmask(a, mask, values) Changes elements of an array based on conditional and input values. Sets ``a.flat[n] = values[n]`` for each n where ``mask.flat[n]==True``. If `values` is not the same size as `a` and `mask` then it will repeat. This gives behavior different from ``a[mask] = values``. Parameters ---------- a : array_like Target array. mask : array_like Boolean mask array. It has to be the same shape as `a`. values : array_like Values to put into `a` where `mask` is True. If `values` is smaller than `a` it will be repeated. See Also -------- place, put, take Examples -------- >>> x = np.arange(6).reshape(2, 3) >>> np.putmask(x, x>2, x**2) >>> x array([[ 0, 1, 2], [ 9, 16, 25]]) If `values` is smaller than `a` it is repeated: >>> x = np.arange(5) >>> np.putmask(x, x>1, [-33, -44]) >>> x array([ 0, 1, -33, -44, -33])` rand(...) `rand(d0, d1, ..., dn) Random values in a given shape. Create an array of the given shape and propagate it with random samples from a uniform distribution over ``[0, 1)``. Parameters ---------- d0, d1, ..., dn : int Shape of the output. Returns ------- out : ndarray, shape ``(d0, d1, ..., dn)`` Random values. See Also -------- random Notes ----- This is a convenience function. If you want an interface that takes a shape-tuple as the first argument, refer to `random`. Examples -------- >>> np.random.rand(3,2) array([[ 0.14022471, 0.96360618], #random [ 0.37601032, 0.25528411], #random [ 0.49313049, 0.94909878]]) #random` randint(...) `randint(low, high=None, size=None) Return random integers x such that low <= x < high. If high is None, then 0 <= x < low.` randn(...) `randn(d0, d1, ..., dn) Returns zero-mean, unit-variance Gaussian random numbers in an array of shape (d0, d1, ..., dn). Note: This is a convenience function. If you want an interface that takes a tuple as the first argument use numpy.random.standard_normal(shape_tuple).` random = random_sample(...) `random_sample(size=None) Return random floats in the half-open interval [0.0, 1.0). Parameters ---------- size : shape tuple, optional Defines the shape of the returned array of random floats. Returns ------- out : ndarray, floats Array of random of floats with shape of `size`.` random_integers(...) `random_integers(low, high=None, size=None) Return random integers x such that low <= x <= high. If high is None, then 1 <= x <= low.` random_sample(...) `random_sample(size=None) Return random floats in the half-open interval [0.0, 1.0). Parameters ---------- size : shape tuple, optional Defines the shape of the returned array of random floats. Returns ------- out : ndarray, floats Array of random of floats with shape of `size`.` ranf = random_sample(...) `random_sample(size=None) Return random floats in the half-open interval [0.0, 1.0). Parameters ---------- size : shape tuple, optional Defines the shape of the returned array of random floats. Returns ------- out : ndarray, floats Array of random of floats with shape of `size`.` rayleigh(...) `rayleigh(scale=1.0, size=None) Rayleigh distribution.` restoredot(...) `Restore `dot`, `vdot`, and `innerproduct` to the default non-BLAS implementations. Typically, the user will only need to call this when troubleshooting and installation problem, reproducing the conditions of a build without an accelerated BLAS, or when being very careful about benchmarking linear algebra operations. See Also -------- alterdot : `restoredot` undoes the effects of `alterdot`.` sample = random_sample(...) `random_sample(size=None) Return random floats in the half-open interval [0.0, 1.0). Parameters ---------- size : shape tuple, optional Defines the shape of the returned array of random floats. Returns ------- out : ndarray, floats Array of random of floats with shape of `size`.` seed(...) `seed(seed=None) Seed the generator. seed can be an integer, an array (or other sequence) of integers of any length, or None. If seed is None, then RandomState will try to read data from /dev/urandom (or the Windows analogue) if available or seed from the clock otherwise.` set_numeric_ops(...) `set_numeric_ops(op1=func1, op2=func2, ...) Set numerical operators for array objects. Parameters ---------- op1, op2, ... : callable Each ``op = func`` pair describes an operator to be replaced. For example, ``add = lambda x, y: np.add(x, y) % 5`` would replace addition by modulus 5 addition. Returns ------- saved_ops : list of callables A list of all operators, stored before making replacements. Notes ----- .. WARNING:: Use with care! Incorrect usage may lead to memory errors. A function replacing an operator cannot make use of that operator. For example, when replacing add, you may not use ``+``. Instead, directly call ufuncs: >>> def add_mod5(x, y): ... return np.add(x, y) % 5 ... >>> old_funcs = np.set_numeric_ops(add=add_mod5) >>> x = np.arange(12).reshape((3, 4)) >>> x + x array([[0, 2, 4, 1], [3, 0, 2, 4], [1, 3, 0, 2]]) >>> ignore = np.set_numeric_ops(**old_funcs) # restore operators` set_state(...) `set_state(state) Set the state from a tuple. Parameters ---------- state : tuple(string, list of 624 ints, int, int, float) The `state` tuple is made up of 1. the string 'MT19937' 2. a list of 624 integer keys 3. an integer pos 4. an integer has_gauss 5. and a float for the cached_gaussian Returns ------- out : None Returns 'None' on success. See Also -------- get_state Notes ----- For backwards compatibility, the following form is also accepted although it is missing some information about the cached Gaussian value. state = ('MT19937', int key[624], int pos)` set_string_function(...) `set_string_function(f, repr=1) Set a Python function to be used when pretty printing arrays. Parameters ---------- f : Python function Function to be used to pretty print arrays. The function should expect a single array argument and return a string of the representation of the array. repr : int Unknown. Examples -------- >>> def pprint(arr): ... return 'HA! - What are you going to do now?' ... >>> np.set_string_function(pprint) >>> a = np.arange(10) >>> a HA! - What are you going to do now? >>> print a [0 1 2 3 4 5 6 7 8 9]` seterrobj(...) `seterrobj(errobj) Used internally by `seterr`. Parameters ---------- errobj : list [buffer_size, error_mask, callback_func] See Also -------- seterrcall` shuffle(...) `shuffle(x) Modify a sequence in-place by shuffling its contents.` standard_cauchy(...) `standard_cauchy(size=None) Standard Cauchy with mode=0.` standard_exponential(...) `standard_exponential(size=None) Standard exponential distribution (scale=1).` standard_gamma(...) `standard_gamma(shape, size=None) Standard Gamma distribution.` standard_normal(...) `standard_normal(size=None) Returns samples from a Standard Normal distribution (mean=0, stdev=1). Parameters ---------- size : int, shape tuple, optional Returns the number of samples required to satisfy the `size` parameter. If not given or 'None' indicates to return one sample. Returns ------- out : float, ndarray Samples the Standard Normal distribution with a shape satisfying the `size` parameter.` standard_t(...) `standard_t(df, size=None) Standard Student's t distribution with df degrees of freedom.` triangular(...) `triangular(left, mode, right, size=None) Triangular distribution starting at left, peaking at mode, and ending at right (left <= mode <= right).` uniform(...) `uniform(low=0.0, high=1.0, size=1) Draw samples from a uniform distribution. Samples are uniformly distributed over the half-open interval ``[low, high)`` (includes low, but excludes high). In other words, any value within the given interval is equally likely to be drawn by `uniform`. Parameters ---------- low : float, optional Lower boundary of the output interval. All values generated will be greater than or equal to low. The default value is 0. high : float Upper boundary of the output interval. All values generated will be less than high. The default value is 1.0. size : tuple of ints, int, optional Shape of output. If the given size is, for example, (m,n,k), m*n*k samples are generated. If no shape is specified, a single sample is returned. Returns ------- out : ndarray Drawn samples, with shape `size`. See Also -------- randint : Discrete uniform distribution, yielding integers. random_integers : Discrete uniform distribution over the closed interval ``[low, high]``. random_sample : Floats uniformly distributed over ``[0, 1)``. random : Alias for `random_sample`. rand : Convenience function that accepts dimensions as input, e.g., ``rand(2,2)`` would generate a 2-by-2 array of floats, uniformly distributed over ``[0, 1)``. Notes ----- The probability density function of the uniform distribution is .. math:: p(x) = \frac{1}{b - a} anywhere within the interval ``[a, b)``, and zero elsewhere. Examples -------- Draw samples from the distribution: >>> s = np.random.uniform(-1,0,1000) All values are within the given interval: >>> np.all(s >= -1) True >>> np.all(s < 0) True Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, 15, normed=True) >>> plt.plot(bins, np.ones_like(bins), linewidth=2, color='r') >>> plt.show()` unpackbits(...) `unpackbits(myarray, axis=None) Unpacks elements of a uint8 array into a binary-valued output array. Each element of `myarray` represents a bit-field that should be unpacked into a binary-valued output array. The shape of the output array is either 1-D (if `axis` is None) or the same shape as the input array with unpacking done along the axis specified. Parameters ---------- myarray : ndarray, uint8 type Input array. axis : int, optional Unpacks along this axis. Returns ------- unpacked : ndarray, uint8 type The elements are binary-valued (0 or 1). See Also -------- packbits : Packs the elements of a binary-valued array into bits in a uint8 array. Examples -------- >>> a = np.array([[2], [7], [23]], dtype=np.uint8) >>> a array([[ 2], [ 7], [23]], dtype=uint8) >>> b = np.unpackbits(a, axis=1) >>> b array([[0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 0, 1, 1, 1]], dtype=uint8)` vdot(...) `Return the dot product of two vectors. The vdot(`a`, `b`) function handles complex numbers differently than dot(`a`, `b`). If the first argument is complex the complex conjugate of the first argument is used for the calculation of the dot product. For 2-D arrays it is equivalent to matrix multiplication, and for 1-D arrays to inner product of vectors (with complex conjugation of `a`). For N dimensions it is a sum product over the last axis of `a` and the second-to-last of `b`:: dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m]) Parameters ---------- a : array_like If `a` is complex the complex conjugate is taken before calculation of the dot product. b : array_like Second argument to the dot product. Returns ------- output : ndarray Returns dot product of `a` and `b`. Can be an int, float, or complex depending on the types of `a` and `b`. See Also -------- dot : Return the dot product without using the complex conjugate of the first argument. Notes ----- The dot product is the summation of element wise multiplication. .. math:: a \cdot b = \sum_{i=1}^n a_i^*b_i = a_1^*b_1+a_2^*b_2+\cdots+a_n^*b_n Examples -------- >>> a = np.array([1+2j,3+4j]) >>> b = np.array([5+6j,7+8j]) >>> np.vdot(a, b) (70-8j) >>> np.vdot(b, a) (70+8j) >>> a = np.array([[1, 4], [5, 6]]) >>> b = np.array([[4, 1], [2, 2]]) >>> np.vdot(a, b) 30 >>> np.vdot(b, a) 30` vonmises(...) `vonmises(mu=0.0, kappa=1.0, size=None) Draw samples from a von Mises distribution. Samples are drawn from a von Mises distribution with specified mode (mu) and dispersion (kappa), on the interval [-pi, pi]. The von Mises distribution (also known as the circular normal distribution) is a continuous probability distribution on the circle. It may be thought of as the circular analogue of the normal distribution. Parameters ---------- mu : float Mode ("center") of the distribution. kappa : float, >= 0. Dispersion of the distribution. size : {tuple, int} Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. Returns ------- samples : {ndarray, scalar} The returned samples live on the unit circle [-\pi, \pi]. See Also -------- scipy.stats.distributions.vonmises : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the von Mises distribution is .. math:: p(x) = \frac{e^{\kappa cos(x-\mu)}}{2\pi I_0(\kappa)}, where :math:`\mu` is the mode and :math:`\kappa` the dispersion, and :math:`I_0(\kappa)` is the modified Bessel function of order 0. The von Mises, named for Richard Edler von Mises, born in Austria-Hungary, in what is now the Ukraine. He fled to the United States in 1939 and became a professor at Harvard. He worked in probability theory, aerodynamics, fluid mechanics, and philosophy of science. References ---------- .. [1] Abramowitz, M. and Stegun, I. A. (ed.), Handbook of Mathematical Functions, National Bureau of Standards, 1964; reprinted Dover Publications, 1965. .. [2] von Mises, Richard, 1964, Mathematical Theory of Probability and Statistics (New York: Academic Press). .. [3] Wikipedia, "Von Mises distribution", http://en.wikipedia.org/wiki/Von_Mises_distribution Examples -------- Draw samples from the distribution: >>> mu, kappa = 0.0, 4.0 # mean and dispersion >>> s = np.random.vonmises(mu, kappa, 1000) Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> import scipy.special as sps >>> count, bins, ignored = plt.hist(s, 50, normed=True) >>> x = arange(-pi, pi, 2*pi/50.) >>> y = -np.exp(kappa*np.cos(x-mu))/(2*pi*sps.jn(0,kappa)) >>> plt.plot(x, y/max(y), linewidth=2, color='r') >>> plt.show()` wald(...) `wald(mean, scale, size=None) Wald (inverse Gaussian) distribution.` weibull(...) `weibull(a, size=None) Weibull distribution. Draw samples from a 1-parameter Weibull distribution with the given shape parameter. .. math:: X = (-ln(U))^{1/a} Here, U is drawn from the uniform distribution over (0,1]. The more common 2-parameter Weibull, including a scale parameter :math:`\lambda` is just :math:`X = \lambda(-ln(U))^{1/a}`. The Weibull (or Type III asymptotic extreme value distribution for smallest values, SEV Type III, or Rosin-Rammler distribution) is one of a class of Generalized Extreme Value (GEV) distributions used in modeling extreme value problems. This class includes the Gumbel and Frechet distributions. Parameters ---------- a : float Shape of the distribution. size : tuple of ints Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. See Also -------- scipy.stats.distributions.weibull : probability density function, distribution or cumulative density function, etc. gumbel, scipy.stats.distributions.genextreme Notes ----- The probability density for the Weibull distribution is .. math:: p(x) = \frac{a} {\lambda}(\frac{x}{\lambda})^{a-1}e^{-(x/\lambda)^a}, where :math:`a` is the shape and :math:`\lambda` the scale. The function has its peak (the mode) at :math:`\lambda(\frac{a-1}{a})^{1/a}`. When ``a = 1``, the Weibull distribution reduces to the exponential distribution. References ---------- .. [1] Waloddi Weibull, Professor, Royal Technical University, Stockholm, 1939 "A Statistical Theory Of The Strength Of Materials", Ingeniorsvetenskapsakademiens Handlingar Nr 151, 1939, Generalstabens Litografiska Anstalts Forlag, Stockholm. .. [2] Waloddi Weibull, 1951 "A Statistical Distribution Function of Wide Applicability", Journal Of Applied Mechanics ASME Paper. .. [3] Wikipedia, "Weibull distribution", http://en.wikipedia.org/wiki/Weibull_distribution Examples -------- Draw samples from the distribution: >>> a = 5. # shape >>> s = np.random.weibull(a, 1000) Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> def weib(x,n,a): ... return (a / n) * (x / n)**(a - 1) * np.exp(-(x / n)**a) >>> count, bins, ignored = plt.hist(np.random.weibull(5.,1000)) >>> x = np.arange(1,100.)/50. >>> scale = count.max()/weib(x, 1., 5.).max() >>> plt.plot(x, weib(x, 1., 5.)*scale) >>> plt.show()` where(...) `where(condition, [x, y]) Return elements, either from `x` or `y`, depending on `condition`. If only `condition` is given, return ``condition.nonzero()``. Parameters ---------- condition : array_like, bool When True, yield `x`, otherwise yield `y`. x, y : array_like, optional Values from which to choose. Returns ------- out : ndarray or tuple of ndarrays If both `x` and `y` are specified, the output array, shaped like `condition`, contains elements of `x` where `condition` is True, and elements from `y` elsewhere. If only `condition` is given, return the tuple ``condition.nonzero()``, the indices where `condition` is True. See Also -------- nonzero, choose Notes ----- If `x` and `y` are given and input arrays are 1-D, `where` is equivalent to:: [xv if c else yv for (c,xv,yv) in zip(condition,x,y)] Examples -------- >>> x = np.arange(9.).reshape(3, 3) >>> np.where( x > 5 ) (array([2, 2, 2]), array([0, 1, 2])) >>> x[np.where( x > 3.0 )] # Note: result is 1D. array([ 4., 5., 6., 7., 8.]) >>> np.where(x < 5, x, -1) # Note: broadcasting. array([[ 0., 1., 2.], [ 3., 4., -1.], [-1., -1., -1.]]) >>> np.where([[True, False], [True, True]], ... [[1, 2], [3, 4]], ... [[9, 8], [7, 6]]) array([[1, 8], [3, 4]]) >>> np.where([[0, 1], [1, 0]]) (array([0, 1]), array([1, 0]))` zeros(...) `zeros(shape, dtype=float, order='C') Return a new array of given shape and type, filled with zeros. Parameters ---------- shape : {tuple of ints, int} Shape of the new array, e.g., ``(2, 3)`` or ``2``. dtype : data-type, optional The desired data-type for the array, e.g., `numpy.int8`. Default is `numpy.float64`. order : {'C', 'F'}, optional Whether to store multidimensional data in C- or Fortran-contiguous (row- or column-wise) order in memory. Returns ------- out : ndarray Array of zeros with the given shape, dtype, and order. See Also -------- numpy.zeros_like : Return an array of zeros with shape and type of input. numpy.ones_like : Return an array of ones with shape and type of input. numpy.empty_like : Return an empty array with shape and type of input. numpy.ones : Return a new array setting values to one. numpy.empty : Return a new uninitialized array. Examples -------- >>> np.zeros(5) array([ 0., 0., 0., 0., 0.]) >>> np.zeros((5,), dtype=numpy.int) array([0, 0, 0, 0, 0]) >>> np.zeros((2, 1)) array([[ 0.], [ 0.]]) >>> s = (2,2) >>> np.zeros(s) array([[ 0., 0.], [ 0., 0.]]) >>> np.zeros((2,), dtype=[('x', 'i4'), ('y', 'i4')]) array([(0, 0), (0, 0)], dtype=[('x', '<i4'), ('y', '<i4')])` zipf(...) `zipf(a, size=None) Draw samples from a Zipf distribution. Samples are drawn from a Zipf distribution with specified parameter (a), where a > 1. The zipf distribution (also known as the zeta distribution) is a continuous probability distribution that satisfies Zipf's law, where the frequency of an item is inversely proportional to its rank in a frequency table. Parameters ---------- a : float parameter, > 1. size : {tuple, int} Output shape. If the given shape is, e.g., ``(m, n, k)``, then ``m * n * k`` samples are drawn. Returns ------- samples : {ndarray, scalar} The returned samples are greater than or equal to one. See Also -------- scipy.stats.distributions.zipf : probability density function, distribution or cumulative density function, etc. Notes ----- The probability density for the Zipf distribution is .. math:: p(x) = \frac{x^{-a}}{\zeta(a)}, where :math:`\zeta` is the Riemann Zeta function. Named after the American linguist George Kingsley Zipf, who noted that the frequency of any word in a sample of a language is inversely proportional to its rank in the frequency table. References ---------- .. [1] Weisstein, Eric W. "Zipf Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/ZipfDistribution.html .. [2] Wikipedia, "Zeta distribution", http://en.wikipedia.org/wiki/Zeta_distribution .. [3] Wikipedia, "Zipf's Law", http://en.wikipedia.org/wiki/Zipf%27s_law .. [4] Zipf, George Kingsley (1932): Selected Studies of the Principle of Relative Frequency in Language. Cambridge (Mass.). Examples -------- Draw samples from the distribution: >>> a = 2. # parameter >>> s = np.random.zipf(a, 1000) Display the histogram of the samples, along with the probability density function: >>> import matplotlib.pyplot as plt >>> import scipy.special as sps Truncate s values at 50 so plot is interesting >>> count, bins, ignored = plt.hist(s[s<50], 50, normed=True) >>> x = arange(1., 50.) >>> y = x**(-a)/sps.zetac(a) >>> plt.plot(x, y/max(y), linewidth=2, color='r') >>> plt.show()`

Data
`` |  | ALLOW_THREADS = 1 BUFSIZE = 10000 CLIP = 0 DAILY = 3 ERR_CALL = 3 ERR_DEFAULT = 0 ERR_DEFAULT2 = 2084 ERR_IGNORE = 0 ERR_LOG = 5 ERR_PRINT = 4 ERR_RAISE = 2 ERR_WARN = 1 FLOATING_POINT_SUPPORT = 1 FPE_DIVIDEBYZERO = 1 FPE_INVALID = 8 FPE_OVERFLOW = 2 FPE_UNDERFLOW = 4 FR = FR False_ = False HOURLY = 4 Inf = inf Infinity = inf MAXDIMS = 32 MINUTELY = 5 MO = MO MONTHLY = 1 NAN = nan NINF = -inf NZERO = -0.0 NaN = nan PINF = inf PZERO = 0.0 RAISE = 2 SA = SA SECONDLY = 6 SHIFT_DIVIDEBYZERO = 0 SHIFT_INVALID = 9 SHIFT_OVERFLOW = 3 SHIFT_UNDERFLOW = 6 SU = SU ScalarType = (<type 'int'>, <type 'float'>, <type 'complex'>, <type 'long'>, <type 'bool'>, <type 'str'>, <type 'unicode'>, <type 'buffer'>, <type 'numpy.int64'>, <type 'numpy.int16'>, <type 'numpy.string_'>, <type 'numpy.uint32'>, <type 'numpy.float96'>, <type 'numpy.int32'>, <type 'numpy.uint64'>, <type 'numpy.int8'>, <type 'numpy.complex128'>, <type 'numpy.uint8'>, <type 'numpy.complex64'>, <type 'numpy.void'>, ...) TH = TH TU = TU True_ = True UFUNC_BUFSIZE_DEFAULT = 10000 UFUNC_PYVALS_NAME = 'UFUNC_PYVALS' WE = WE WEEKLY = 2 WRAP = 1 YEARLY = 0 absolute = <ufunc 'absolute'> add = <ufunc 'add'> arccos = <ufunc 'arccos'> arccosh = <ufunc 'arccosh'> arcsin = <ufunc 'arcsin'> arcsinh = <ufunc 'arcsinh'> arctan = <ufunc 'arctan'> arctan2 = <ufunc 'arctan2'> arctanh = <ufunc 'arctanh'> bitwise_and = <ufunc 'bitwise_and'> bitwise_not = <ufunc 'invert'> bitwise_or = <ufunc 'bitwise_or'> bitwise_xor = <ufunc 'bitwise_xor'> c_ = <numpy.lib.index_tricks.CClass object at 0xb72b3e0c> cast = {<type 'numpy.int64'>: <function <lambda> at 0xb...numpy.bool_'>: <function <lambda> at 0xb736b994>} ceil = <ufunc 'ceil'> conj = <ufunc 'conjugate'> conjugate = <ufunc 'conjugate'> cos = <ufunc 'cos'> cosh = <ufunc 'cosh'> deg2rad = <ufunc 'deg2rad'> degrees = <ufunc 'degrees'> divide = <ufunc 'divide'> e = 2.7182818284590451 equal = <ufunc 'equal'> exp = <ufunc 'exp'> exp2 = <ufunc 'exp2'> expm1 = <ufunc 'expm1'> fabs = <ufunc 'fabs'> floor = <ufunc 'floor'> floor_divide = <ufunc 'floor_divide'> fmax = <ufunc 'fmax'> fmin = <ufunc 'fmin'> fmod = <ufunc 'fmod'> frexp = <ufunc 'frexp'> greater = <ufunc 'greater'> greater_equal = <ufunc 'greater_equal'> hypot = <ufunc 'hypot'> index_exp = <numpy.lib.index_tricks.IndexExpression object at 0xb72b3f6c> inf = inf infty = inf invert = <ufunc 'invert'> isfinite = <ufunc 'isfinite'> isinf = <ufunc 'isinf'> isnan = <ufunc 'isnan'> ldexp = <ufunc 'ldexp'> left_shift = <ufunc 'left_shift'> less = <ufunc 'less'> less_equal = <ufunc 'less_equal'> little_endian = True log = <ufunc 'log'> log10 = <ufunc 'log10'> log1p = <ufunc 'log1p'> logaddexp = <ufunc 'logaddexp'> logaddexp2 = <ufunc 'logaddexp2'> logical_and = <ufunc 'logical_and'> logical_not = <ufunc 'logical_not'> logical_or = <ufunc 'logical_or'> logical_xor = <ufunc 'logical_xor'> maximum = <ufunc 'maximum'> mgrid = <numpy.lib.index_tricks.nd_grid object at 0xb72b3cec> minimum = <ufunc 'minimum'> mod = <ufunc 'remainder'> modf = <ufunc 'modf'> multiply = <ufunc 'multiply'> nan = nan nbytes = {<type 'numpy.int64'>: 8, <type 'numpy.int16'>: ...type 'numpy.uint32'>: 4, <type 'numpy.bool_'>: 1} negative = <ufunc 'negative'> newaxis = None not_equal = <ufunc 'not_equal'> ogrid = <numpy.lib.index_tricks.nd_grid object at 0xb72b3d0c> ones_like = <ufunc 'ones_like'> pi = 3.1415926535897931 r_ = <numpy.lib.index_tricks.RClass object at 0xb72b3d8c> rad2deg = <ufunc 'rad2deg'> radians = <ufunc 'radians'> rcParams = {'figure.subplot.right': 0.90000000000000002, 'm...persize': 'letter', 'svg.embed_char_paths': True} rcParamsDefault = {'figure.subplot.right': 0.90000000000000002, 'm...persize': 'letter', 'svg.embed_char_paths': True} reciprocal = <ufunc 'reciprocal'> remainder = <ufunc 'remainder'> right_shift = <ufunc 'right_shift'> rint = <ufunc 'rint'> s_ = <numpy.lib.index_tricks.IndexExpression object at 0xb72b3fac> sctypeDict = {0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>, 2: <type 'numpy.uint8'>, 3: <type 'numpy.int16'>, 4: <type 'numpy.uint16'>, 5: <type 'numpy.int32'>, 6: <type 'numpy.uint32'>, 7: <type 'numpy.int32'>, 8: <type 'numpy.uint32'>, 9: <type 'numpy.int64'>, ...} sctypeNA = {'?': 'Bool', 'B': 'UInt8', 'Bool': <type 'numpy.bool_'>, 'Complex32': <type 'numpy.complex64'>, 'Complex64': <type 'numpy.complex128'>, 'Complex96': <type 'numpy.complex192'>, 'D': 'Complex64', 'F': 'Complex32', 'Float32': <type 'numpy.float32'>, 'Float64': <type 'numpy.float64'>, ...} sctypes = {'complex': [<type 'numpy.complex64'>, <type 'numpy.complex128'>, <type 'numpy.complex192'>], 'float': [<type 'numpy.float32'>, <type 'numpy.float64'>, <type 'numpy.float96'>], 'int': [<type 'numpy.int8'>, <type 'numpy.int16'>, <type 'numpy.int32'>, <type 'numpy.int32'>, <type 'numpy.int64'>], 'others': [<type 'bool'>, <type 'object'>, <type 'str'>, <type 'unicode'>, <type 'numpy.void'>], 'uint': [<type 'numpy.uint8'>, <type 'numpy.uint16'>, <type 'numpy.uint32'>, <type 'numpy.uint32'>, <type 'numpy.uint64'>]} sign = <ufunc 'sign'> signbit = <ufunc 'signbit'> sin = <ufunc 'sin'> sinh = <ufunc 'sinh'> sqrt = <ufunc 'sqrt'> square = <ufunc 'square'> subtract = <ufunc 'subtract'> tan = <ufunc 'tan'> tanh = <ufunc 'tanh'> true_divide = <ufunc 'true_divide'> trunc = <ufunc 'trunc'> typeDict = {0: <type 'numpy.bool_'>, 1: <type 'numpy.int8'>, 2: <type 'numpy.uint8'>, 3: <type 'numpy.int16'>, 4: <type 'numpy.uint16'>, 5: <type 'numpy.int32'>, 6: <type 'numpy.uint32'>, 7: <type 'numpy.int32'>, 8: <type 'numpy.uint32'>, 9: <type 'numpy.int64'>, ...} typeNA = {'?': 'Bool', 'B': 'UInt8', 'Bool': <type 'numpy.bool_'>, 'Complex32': <type 'numpy.complex64'>, 'Complex64': <type 'numpy.complex128'>, 'Complex96': <type 'numpy.complex192'>, 'D': 'Complex64', 'F': 'Complex32', 'Float32': <type 'numpy.float32'>, 'Float64': <type 'numpy.float64'>, ...} typecodes = {'All': '?bhilqpBHILQPfdgFDGSUVO', 'AllFloat': 'fdgFDG', 'AllInteger': 'bBhHiIlLqQpP', 'Character': 'c', 'Complex': 'FDG', 'Float': 'fdg', 'Integer': 'bhilqp', 'UnsignedInteger': 'BHILQP'}