예제 #1
0
def nplabels(labels_array, uuid=None, importances=None, **kwargs):
    """1d labels"""
    from clodius.tiles import nplabels
    from clodius.tiles import npvector

    return Tileset(uuid=uuid,
                   tileset_info=lambda: npvector.tileset_info(
                       labels_array, bins_per_dimension=16),
                   tiles=lambda tids: nplabels.tiles_wrapper(
                       labels_array, tids, importances),
                   datatype="linear-labels",
                   **kwargs)
예제 #2
0
def test_npvector():
    array = np.array(range(100))
    # print('ts:', hgnv.tileset_info(array))
    assert ('max_width' in hgnv.tileset_info(array))

    hgnv.tiles(array, 0, 0)
예제 #3
0
def test_npvector():
    array = np.array([float(f) for f in range(100)])
    # print('ts:', hgnv.tileset_info(array))
    assert "max_width" in hgnv.tileset_info(array)

    hgnv.tiles(array, 0, 0)