Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [Development]
<!-- Do Not Erase This Section - Used for tracking unreleased changes -->

### Fixed
- **Mypy**: Declare UMAP mixin weighted-edge DataFrame attributes for type checking.

### Tests
- **Temporal**: Added datetime unit parity coverage (ms/us/ns) for ring layouts, GFQL time ring layouts, and temporal comparison predicates; relaxed honeypot hypergraph datetime unit expectations.

Expand Down
13 changes: 9 additions & 4 deletions graphistry/umap_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@

logger = setup_logger(__name__)

DataFrameLike = Union[pd.DataFrame, Any]

if TYPE_CHECKING:
MIXIN_BASE = FeatureMixin
class _UMAPMixinBase(FeatureMixin):
_weighted_edges_df: Optional[DataFrameLike]
_weighted_edges_df_from_nodes: Optional[DataFrameLike]
_weighted_edges_df_from_edges: Optional[DataFrameLike]

MIXIN_BASE = _UMAPMixinBase
else:
MIXIN_BASE = object


DataFrameLike = Union[pd.DataFrame, Any]

# Error message for empty feature matrix
_EMPTY_FEATURES_ERROR_MSG = (
"UMAP requires at least one numeric feature column, but received empty feature matrix. "
Expand Down Expand Up @@ -1134,3 +1138,4 @@ def filter_weighted_edges(

if not inplace:
return res

Loading