File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,11 @@ def __init__(
565
565
566
566
self ._create_db ()
567
567
568
+ # numpy 2 no longer has prod, but Python >= 3.8 does. We either have
569
+ # one or the other, so use the python math.prod method when available
570
+ # and fall abck to np if not.
571
+ self ._prod = math .prod if hasattr (math , 'prod' ) else np .prod
572
+
568
573
self ._attributes = {
569
574
_QueryResourceType .STUDIES : self ._get_attributes (
570
575
_QueryResourceType .STUDIES
@@ -584,10 +589,6 @@ def __init__(
584
589
end = time .time ()
585
590
elapsed = round (end - start )
586
591
logger .info (f'updated database in { elapsed } seconds' )
587
- # numpy 2 no longer has prod, but Python >= 3.8 does. We either have
588
- # one or the other, so use the python math.prod method when available
589
- # and fall abck to np if not.
590
- self ._prod = math .prod if hasattr (math , 'prod' ) else np .prod
591
592
592
593
def __getstate__ (self ) -> dict :
593
594
"""Customize state for serialization via pickle module.
You can’t perform that action at this time.
0 commit comments