@@ -464,8 +464,8 @@ def align_minibatches(batches=None):
464
464
465
465
466
466
class Data :
467
- """Data container class that wraps the Aesara ``SharedVariable`` class
468
- and lets the model be aware of its inputs and outputs.
467
+ """Data container class that wraps :func:`aesara.shared` and lets
468
+ the model be aware of its inputs and outputs.
469
469
470
470
Parameters
471
471
----------
@@ -478,10 +478,12 @@ class Data:
478
478
random variables). Use this when `value` is a pandas Series or DataFrame. The
479
479
`dims` will then be the name of the Series / DataFrame's columns. See ArviZ
480
480
documentation for more information about dimensions and coordinates:
481
- https:// arviz-devs.github.io/arviz/notebooks/Introduction.html
481
+ :ref:` arviz:quickstart`.
482
482
export_index_as_coords: bool, optional, default=False
483
483
If True, the `Data` container will try to infer what the coordinates should be
484
484
if there is an index in `value`.
485
+ **kwargs: dict, optional
486
+ Extra arguments passed to :func:`aesara.shared`.
485
487
486
488
Examples
487
489
--------
@@ -512,7 +514,15 @@ class Data:
512
514
https://docs.pymc.io/notebooks/data_container.html
513
515
"""
514
516
515
- def __new__ (self , name , value , * , dims = None , export_index_as_coords = False ):
517
+ def __new__ (
518
+ self ,
519
+ name ,
520
+ value ,
521
+ * ,
522
+ dims = None ,
523
+ export_index_as_coords = False ,
524
+ ** kwargs ,
525
+ ):
516
526
if isinstance (value , list ):
517
527
value = np .array (value )
518
528
@@ -528,7 +538,7 @@ def __new__(self, name, value, *, dims=None, export_index_as_coords=False):
528
538
529
539
# `pandas_to_array` takes care of parameter `value` and
530
540
# transforms it to something digestible for pymc
531
- shared_object = aesara .shared (pandas_to_array (value ), name )
541
+ shared_object = aesara .shared (pandas_to_array (value ), name , ** kwargs )
532
542
533
543
if isinstance (dims , str ):
534
544
dims = (dims ,)
0 commit comments