Add dot method #37

kwgoodman opened this Issue Jan 16, 2012 · 2 comments

2 participants


I think a good addition to la would be and/or a dot method:, join='inner', fill=np.nan)

where fill is used when the join method ('outer', 'left', 'right') creates new data.


This sounds quite nice. There should be no need for a join, at least depending on what we mean by "join"... the axis that would need the same label would be the axis we are multiplying on, which doesn't exist in the output.

We might need to join on that axis (actually, it would be different axes unless both larrys are 1d) before dotting, but then allowing a fill value seems to be confusing and unlikely to be useful. I would think we would just want to either do an inner join or, if the user requests it, raise an error whenever there is not an exact match on the labels.

If we went ahead and did some other join and filled using nans, every single entry in the output would be nan. Filling with zeros would give the exact same answer as an inner join. And filling with anything else, while it would do something, seems unlikely to be useful.

I might not be thinking through all the possibilities, though.


That sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment