On 12/27/2011 3:29 PM, Bryan Jurish wrote:

From a more principled (as opposed to purely pragmatic) standpoint, I
think there are good reasons to allow size-0 dimensions across the
board, even in constructors like zeroes(), ones(), sequence(), xvals(),
etc.  The main reason for this is to provide identity elements for
glue().  In my day job, I deal pretty much exclusively with
concatenative monoids (string languages), and these are pretty
uninteresting (not to mention intractable) without the empty string.
Putting it differently, I think glue() should be a (family of)
concatenative monoid(s) rather than just a boring old semigroup ;-)

The identity element argument seems like a plausible
justification/motivation for the existence and meaning of
such piddle shapes with 0-length dimensions.

Could the same effect be obtained by adding an explicit
dimension shape piddle/list to your CCS objects?  It
seems like the missing piece with the current PDL is
a clever way to carry around the shape info in only
two piddles.

Cheers,
Chris

Thoughts, objections, comments, corrections, and further discussion welcome!

marmosets,
        Bryan

On 2011-12-20 14:37:08, chm<[email protected]>  appears to have
written:
On 12/20/2011 6:25 AM, Bryan Jurish wrote:
On 2011-12-18 22:56, chm wrote:
Fails tests:
MOOCOW/PDL-CCS-1.14.tar.gz (requires PDL::VectorValued)

Should be fixed (band-aided) in newest PDL::CCS on CPAN
(MOOCOW/PDL-CCS-1.15.tar.gz).  The culprit seems to have been a change
in the PDL core's handling of Nx0 piddles somewhere between 2.4.9 and
2.4.9_015.  Report filed as sourceforge bug #3462924

(https://sourceforge.net/tracker/?func=detail&aid=3462924&group_id=612&atid=100612).

   This is a degenerate case, but it can easily happen in PDL::CCS (sparse
piddles) as a result of run-of-the-mill internal index-piddle twiddling.

Hi Bryan-

I'm not sure I comprehend what a [2,0] shaped
piddle means.  My first thought is that it
should not be returned by dice_axis at all.

There have been some changes to PDL since 2.4.9
in *exactly* those edge cases.  But the previous
handling caused segfaults in perl.  I would like
for some feedback from the range-master based
on further discussion.

Maybe you could post separately to the mailing
list with some examples showing where non-trivial
0 length dimensions were supported, how they
arise in practice...  In particular, is there
different code approaches that could work?



_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to