Skip to content

Compatibility Issue with sparse when building a COO matrix #1

@fspinna

Description

@fspinna

The new sparse==0.16.0 release raises the following error when calling to_dense:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<timed exec> in <module>

[/usr/local/lib/python3.11/dist-packages/pyrregular/accessor.py](https://localhost:8080/#) in to_dense(self, reset_time_index, ts_level, index_scale, absolute_time, concatenate_time, normalize_time)
     61     ):
     62         if reset_time_index:
---> 63             X, T = self.reset_time_index(
     64                 ts_level=ts_level,
     65                 index_scale=index_scale,

2 frames
[/usr/local/lib/python3.11/dist-packages/sparse/numba_backend/_coo/core.py](https://localhost:8080/#) in __init__(self, coords, data, shape, has_duplicates, sorted, prune, cache, fill_value, idx_dtype)
    243 
    244         if shape is None:
--> 245             raise ValueError("`shape` was not provided.")
    246 
    247         if not isinstance(shape, Iterable):

ValueError: `shape` was not provided.

This should be addressed in future updates for improved compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions