Skip to content

Commit b753e72

Browse files
GH1520 Clean up klass for npt.NDArray[np.object_] (#1552)
1 parent 0dcb695 commit b753e72

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

tests/test_plotting.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ def test_bootstrap_plot(close_figures: None) -> None:
212212

213213
def test_hist(close_figures: None) -> None:
214214
df = pd.DataFrame({"Col1": [1, 2], "Col4": [2, 1]})
215-
check(assert_type(df.hist(), npt.NDArray[np.object_]), npt.NDArray[np.object_])
215+
check(assert_type(df.hist(), npt.NDArray[np.object_]), np.ndarray)
216216
check(
217217
assert_type(df.hist(by="Col4"), npt.NDArray[np.object_]),
218-
npt.NDArray[np.object_],
218+
np.ndarray,
219219
)
220220

221221

@@ -380,7 +380,7 @@ def test_scatter_matrix(close_figures: None) -> None:
380380
pd.plotting.scatter_matrix(df, alpha=0.2),
381381
npt.NDArray[np.object_],
382382
),
383-
npt.NDArray[np.object_],
383+
np.ndarray,
384384
)
385385

386386

@@ -399,14 +399,14 @@ def test_plot_line() -> None:
399399
IRIS_DF.plot.line(subplots=True),
400400
npt.NDArray[np.object_],
401401
),
402-
npt.NDArray[np.object_],
402+
np.ndarray,
403403
)
404404
check(
405405
assert_type(
406406
IRIS_DF.plot(kind="line", subplots=True),
407407
npt.NDArray[np.object_],
408408
),
409-
npt.NDArray[np.object_],
409+
np.ndarray,
410410
)
411411

412412

@@ -418,14 +418,14 @@ def test_plot_area(close_figures: None) -> None:
418418
IRIS_DF.plot.area(subplots=True),
419419
npt.NDArray[np.object_],
420420
),
421-
npt.NDArray[np.object_],
421+
np.ndarray,
422422
)
423423
check(
424424
assert_type(
425425
IRIS_DF.plot(kind="area", subplots=True),
426426
npt.NDArray[np.object_],
427427
),
428-
npt.NDArray[np.object_],
428+
np.ndarray,
429429
)
430430

431431

@@ -437,14 +437,14 @@ def test_plot_bar(close_figures: None) -> None:
437437
IRIS_DF.plot.bar(subplots=True),
438438
npt.NDArray[np.object_],
439439
),
440-
npt.NDArray[np.object_],
440+
np.ndarray,
441441
)
442442
check(
443443
assert_type(
444444
IRIS_DF.plot(kind="bar", subplots=True),
445445
npt.NDArray[np.object_],
446446
),
447-
npt.NDArray[np.object_],
447+
np.ndarray,
448448
)
449449

450450

@@ -456,14 +456,14 @@ def test_plot_barh(close_figures: None) -> None:
456456
IRIS_DF.plot.barh(subplots=True),
457457
npt.NDArray[np.object_],
458458
),
459-
npt.NDArray[np.object_],
459+
np.ndarray,
460460
)
461461
check(
462462
assert_type(
463463
IRIS_DF.plot(kind="barh", subplots=True),
464464
npt.NDArray[np.object_],
465465
),
466-
npt.NDArray[np.object_],
466+
np.ndarray,
467467
)
468468

469469

@@ -494,14 +494,14 @@ def test_plot_density(close_figures: None) -> None:
494494
IRIS_DF.plot.density(subplots=True),
495495
npt.NDArray[np.object_],
496496
),
497-
npt.NDArray[np.object_],
497+
np.ndarray,
498498
)
499499
check(
500500
assert_type(
501501
IRIS_DF.plot(kind="density", subplots=True),
502502
npt.NDArray[np.object_],
503503
),
504-
npt.NDArray[np.object_],
504+
np.ndarray,
505505
)
506506

507507

@@ -519,14 +519,14 @@ def test_plot_hexbin(close_figures: None) -> None:
519519
IRIS_DF.plot.hexbin(x="SepalLength", y="SepalWidth", subplots=True),
520520
npt.NDArray[np.object_],
521521
),
522-
npt.NDArray[np.object_],
522+
np.ndarray,
523523
)
524524
check(
525525
assert_type(
526526
IRIS_DF.plot(kind="hexbin", x="SepalLength", y="SepalWidth", subplots=True),
527527
npt.NDArray[np.object_],
528528
),
529-
npt.NDArray[np.object_],
529+
np.ndarray,
530530
)
531531

532532

@@ -538,14 +538,14 @@ def test_plot_hist(close_figures: None) -> None:
538538
IRIS_DF.plot.hist(subplots=True),
539539
npt.NDArray[np.object_],
540540
),
541-
npt.NDArray[np.object_],
541+
np.ndarray,
542542
)
543543
check(
544544
assert_type(
545545
IRIS_DF.plot(subplots=True, kind="hist"),
546546
npt.NDArray[np.object_],
547547
),
548-
npt.NDArray[np.object_],
548+
np.ndarray,
549549
)
550550

551551

@@ -557,14 +557,14 @@ def test_plot_kde(close_figures: None) -> None:
557557
IRIS_DF.plot.kde(subplots=True),
558558
npt.NDArray[np.object_],
559559
),
560-
npt.NDArray[np.object_],
560+
np.ndarray,
561561
)
562562
check(
563563
assert_type(
564564
IRIS_DF.plot(subplots=True, kind="kde"),
565565
npt.NDArray[np.object_],
566566
),
567-
npt.NDArray[np.object_],
567+
np.ndarray,
568568
)
569569

570570

@@ -576,15 +576,15 @@ def test_plot_pie(close_figures: None) -> None:
576576
IRIS_DF.plot.pie(y="SepalLength", subplots=True),
577577
npt.NDArray[np.object_],
578578
),
579-
npt.NDArray[np.object_],
579+
np.ndarray,
580580
)
581581

582582
check(
583583
assert_type(
584584
IRIS_DF.plot(kind="pie", y="SepalLength", subplots=True),
585585
npt.NDArray[np.object_],
586586
),
587-
npt.NDArray[np.object_],
587+
np.ndarray,
588588
)
589589

590590

@@ -604,7 +604,7 @@ def test_plot_scatter(close_figures: None) -> None:
604604
IRIS_DF.plot.scatter(x="SepalLength", y="SepalWidth", subplots=True),
605605
npt.NDArray[np.object_],
606606
),
607-
npt.NDArray[np.object_],
607+
np.ndarray,
608608
)
609609
check(
610610
assert_type(
@@ -613,7 +613,7 @@ def test_plot_scatter(close_figures: None) -> None:
613613
),
614614
npt.NDArray[np.object_],
615615
),
616-
npt.NDArray[np.object_],
616+
np.ndarray,
617617
)
618618

619619

@@ -697,7 +697,7 @@ def test_plot_subplot_changes_150() -> None:
697697
assert_type(
698698
df.plot(subplots=[("a", "b"), ("c", "d")]), npt.NDArray[np.object_]
699699
),
700-
npt.NDArray[np.object_],
700+
np.ndarray,
701701
)
702702

703703

0 commit comments

Comments
 (0)