Skip to content

Logging boolean tensors not supported #3298

@roym899

Description

@roym899

Describe the annoyance
It'd be nice if boolean tensors could be logged (and show up as black and white masks in Rerun).

To Reproduce

import numpy as np
import rerun as rr
import rerun.experimental as rr2

rr.init("mask", spawn=True)
mask = np.random.rand(100, 100) > 0.5
rr2.log("mask", rr2.Tensor(mask))

gives

AssertionError: Failed to find <class 'numpy.bool_'> in f{<class 'numpy.uint8'>: 'U8', <class 'numpy.uint16'>: 'U16', <class 'numpy.uint32'>: 'U32', <class 'numpy.uint64'>: 'U64', <class 'numpy.int8'>: 'I8', <class 'numpy.int16'>: 'I16', <class 'numpy.int32'>: 'I32', <class 'numpy.int64'>: 'I64', <class 'numpy.float16'>: 'F16', <class 'numpy.float32'>: 'F32', <class 'numpy.float64'>: 'F64'}

Expected behavior
Show a black and white mask in the Rerun viewer.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Rerun version

rerun_py 0.9.0-alpha.4 [rustc 1.72.0 (5680fa18f 2023-08-23), LLVM 16.0.5] x86_64-unknown-linux-gnu 7db7b54, built 2023-09-12T08:50:21Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request😤 annoyingSomething in the UI / SDK is annoying to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions