I tried to add a binary import method to class FileFormat(metaclass=FileFormatMeta) in io.py, but gave up trying to adapt a copy of the CSV method since so much is specific to CSV issues and the comments are sparse...

Basically, given an Ncols x Mrows raw file of known type and meta data, one should be able to supply the shape, sample rate etc as defaults, and then one "only" needs to satisfy the parameters for Table.from_numpy(). It is the creation of Orange-specific objects that have me stuck, and mainly the domain object:

def data_table_from_bin(cls, data, headers=None):
    domain = Domain(attrs, clses, metas)

    table = Table.from_numpy(domain, X, Y, M, W)
    return table

Has anyone else tried this, or have suggestions?

What is the problem exactly?

When you create Domain you have to specify each Feature eg:

from Orange.data import Domain, Table, ContinuousVariable, DiscreteVariable

d = Domain([ContinuousVariable.make('Attribute 1'), DiscreteVariable.make('Attribute 2')])

Here is a link to doc, regarding Domain (yes, it's not the best)

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.