Exemple #1
0
import warnings

from PyQt4 import QtGui

import numpy
import tables

import vitables.utils

translate = QtGui.QApplication.translate
# Restrict the available flavors to 'numpy' so that reading a leaf
# always return a numpy array instead of an object of the kind indicated
# by the leaf flavor. For VLArrays the read data is returned as a list whose
# elements will be numpy arrays.
tables.restrict_flavors(keep=['numpy'])
warnings.filterwarnings('ignore', category=tables.FlavorWarning)
warnings.filterwarnings('ignore', category=tables.NaturalNameWarning)


class Buffer(object):
    """
    Buffer used to access the real data contained in `PyTables` datasets.

    Note that the buffer number of rows **must** be at least equal to the number
    of rows of the table widget it is going to fill. This way we avoid to have
    partially filled tables.
    Also note that rows in buffer are numbered from 0 to N (as it happens with
    the data source).

    Leaves are displayed in MxN table widgets:
Exemple #2
0
import warnings

from PyQt4 import QtGui

import numpy
import tables

import vitables.utils


translate = QtGui.QApplication.translate
# Restrict the available flavors to 'numpy' so that reading a leaf
# always return a numpy array instead of an object of the kind indicated
# by the leaf flavor. For VLArrays the read data is returned as a list whose
# elements will be numpy arrays.
tables.restrict_flavors(keep=['numpy'])
warnings.filterwarnings('ignore', category=tables.FlavorWarning)
warnings.filterwarnings('ignore', category=tables.NaturalNameWarning)


class Buffer(object):
    """
    Buffer used to access the real data contained in `PyTables` datasets.

    Note that the buffer number of rows **must** be at least equal to the number
    of rows of the table widget it is going to fill. This way we avoid to have
    partially filled tables.
    Also note that rows in buffer are numbered from 0 to N (as it happens with
    the data source).

    Leaves are displayed in MxN table widgets:
Exemple #3
0
import warnings

from PyQt4 import QtGui

import numpy
import tables

import vitables.utils


translate = QtGui.QApplication.translate
# Restrict the available flavors to 'numpy' so that reading a leaf
# always return a numpy array instead of an object of the kind indicated
# by the leaf flavor. For VLArrays the read data is returned as a list whose
# elements will be numpy arrays.
tables.restrict_flavors(keep=["numpy"])
warnings.filterwarnings("ignore", category=tables.FlavorWarning)
warnings.filterwarnings("ignore", category=tables.NaturalNameWarning)


class Buffer(object):
    """
    Buffer used to access the real data contained in `PyTables` datasets.

    Note that the buffer number of rows **must** be at least equal to the number
    of rows of the table widget it is going to fill. This way we avoid to have
    partially filled tables.
    Also note that rows in buffer are numbered from 0 to N (as it happens with
    the data source).

    Leaves are displayed in MxN table widgets: