Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 24, 2024
1 parent 5cdb086 commit 5a45c69
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,46 +1,23 @@
from __future__ import annotations

import itertools
import logging
import warnings
from functools import partial, reduce
from functools import partial
from typing import TYPE_CHECKING, Callable
from unittest.mock import MagicMock, patch

import numpy as np
import pandas as pd
import pytest
from numpy_groupies.aggregate_numpy import aggregate

import flox
from flox import xrutils
from flox.aggregations import Aggregation, _initialize_aggregation, _maybe_promote_int
from flox.core import (
HAS_NUMBAGG,
_choose_engine,
_convert_expected_groups_to_index,
_get_optimal_chunks_for_groups,
_normalize_indexes,
_validate_reindex,
factorize_,
find_group_cohorts,
groupby_reduce,
rechunk_for_cohorts,
reindex_,
subset_to_blocks,
)

from . import (
ALL_FUNCS,
BLOCKWISE_FUNCS,
SCIPY_STATS_FUNCS,
assert_equal,
assert_equal_tuple,
has_cubed,
has_dask,
raise_if_dask_computes,
requires_cubed,
requires_dask,
)

logger = logging.getLogger("flox")
Expand All @@ -53,8 +30,6 @@

if has_dask:
import dask
import dask.array as da
from dask.array import from_array

dask.config.set(scheduler="sync")
else:
Expand All @@ -64,13 +39,13 @@ def dask_array_ones(*args):


if has_cubed:
import cubed
pass


DEFAULT_QUANTILE = 0.9

if TYPE_CHECKING:
from flox.core import T_Agg, T_Engine, T_ExpectedGroupsOpt, T_Method
pass


def _get_array_func(func: str) -> Callable:
Expand Down

0 comments on commit 5a45c69

Please sign in to comment.