Skip to content

Commit

Permalink
Update missing hipscat references
Browse files Browse the repository at this point in the history
  • Loading branch information
camposandro committed Oct 21, 2024
1 parent 782c221 commit 42433be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/hats/catalog/healpix_dataset/healpix_dataset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import dataclasses
import warnings
from pathlib import Path
from typing import List, Tuple, Union
Expand Down Expand Up @@ -153,7 +152,7 @@ def __len__(self):
This value is undetermined when the catalog is modified, and
therefore an error is raised.
"""
if self.catalog_info.total_rows is None:
if self.catalog_info.total_rows == 0:
raise ValueError("The number of rows is undetermined because the catalog was modified.")
return self.catalog_info.total_rows

Expand Down
2 changes: 1 addition & 1 deletion src/hats/pixel_math/sparse_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
from scipy.sparse import csc_array, load_npz, save_npz, sparray

import hipscat.pixel_math.healpix_shim as hp
import hats.pixel_math.healpix_shim as hp


class SparseHistogram:
Expand Down
4 changes: 2 additions & 2 deletions tests/hats/pixel_math/test_sparse_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from numpy import frombuffer
from scipy.sparse import csr_array

import hipscat.pixel_math.healpix_shim as hp
from hipscat.pixel_math.sparse_histogram import SparseHistogram
import hats.pixel_math.healpix_shim as hp
from hats.pixel_math.sparse_histogram import SparseHistogram


def test_make_empty():
Expand Down

0 comments on commit 42433be

Please sign in to comment.