(bimask)
| 52 | |
| 53 | |
| 54 | def encode(bimask): |
| 55 | if len(bimask.shape) == 3: |
| 56 | return _mask.encode(bimask) |
| 57 | elif len(bimask.shape) == 2: |
| 58 | h, w = bimask.shape |
| 59 | return _mask.encode(bimask.reshape((h, w, 1), order='F'))[0] |
| 60 | |
| 61 | |
| 62 | def decode(rleObjs): |
nothing calls this directly
no outgoing calls
no test coverage detected