Henry--
The transcripted excerpts below show the latest instance of my problems with 
lost values.

Happy hunting (not haunting).
--Art

> On 1Nov 2020, at 4:46 PM, Henry Rich <[email protected]> wrote:
> If you give me a script that reproduces the problem, I will fix it.  The less 
> you give, the less my chances of fixing it.  With a report as sketchy as the 
> one you provided I can do nothing.
-------------------

Debugging J902beta-j

Program steps:

  fb2=. (<"0 fw) {."0 1 each"1 fb1       NB. Setting common internal widths in 
each column
  fb3=. < CTicl & CTTrncAry eachfb2      NB. Trimming items if needed
  y2=. ,"2 each/"1 ,"1 each/"1 fb2       NB. Merging to level-1 rank-m 
character table(s)

After stop:

      $each fb2
┌────┬────┬────┬────┐
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│5 17│5 22│5 22│5 22│
├────┼────┼────┼────┤
│6 17│6 22│6 22│6 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
└────┴────┴────┴────┘

┌────┬────┬────┬────┐
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
└────┴────┴────┴────┘

┌────┬────┬────┬────┐
│6 17│6 22│6 22│6 22│
├────┼────┼────┼────┤
│6 17│6 22│6 22│6 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
└────┴────┴────┴────┘


┌────┬────┬────┬────┐
│6 17│6 22│6 22│6 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│6 17│6 22│6 22│6 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
└────┴────┴────┴────┘

┌────┬────┬────┬────┐
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│6 17│6 22│6 22│6 22│
├────┼────┼────┼────┤
│6 17│6 22│6 22│6 22│
├────┼────┼────┼────┤
│6 17│6 22│6 22│6 22│
└────┴────┴────┴────┘

┌────┬────┬────┬────┐
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
├────┼────┼────┼────┤
│7 17│7 22│7 22│7 22│
└────┴────┴────┴────┘
      $each fb3
$&.> fb3
      $each y2                   NB. A problem value, from earlier runs, but 
should be local
┌───┬───┬───┐
│3 4│3 4│3 4│
├───┼───┼───┤
│3 4│3 4│3 4│
└───┴───┴───┘
      $each fb3
$&.> fb3
      fb3
< 80 40&CTTrncAry eachfb2
      ] fb3=. < CTicl & CTTrncAry eachfb2
] (< 80 40&CTTrncAry eachfb2)    NB. Note error report malformation
      $ fb2                      NB. fb2 has shape, but apparently no good value
2 3 4 4

------

Routine called dozens of times before this point (probably not the culprit):

CTTrncAry=: 4 : 0
 NB. Truncates shape of one rank-n level-m array--contained in y--to fit
 NB.   within shape x, marking any loss of data
 NB. if. CTStops do. 'Stop' 13!:8 [ 2 end.
 yval=. > y    NB. Beware mixed types!

 xrev=. (|. $yval) <. ($$yval) {.!._ |. x
  NB. Adjusts (reversed) shape not to over-rank or over-fill
  NB. xrev=. xrev <. (# xrev) {.!.1 (CTRankLim # _)  NB. Flattens excess axes 
(without notice)

 if.  +./  cuts=. xrev < |. $ yval  do.    NB. Axes exceeding bounds
  marks=. > ((((<0),(<' '),(<a:)) i. ([: <@{. [: >@(0&{.@,) ])) { 
CTTrncMks&[)yval
  for_axis.  1 + i. $$yval  do.
   if.  (axis-1){ cuts  do.
    yval=. (((axis-1) { xrev) {."axis yval) ,"axis (axis > 1) { marks
   end.
  end.
 else.
  < yval  NB. Boxed
  return.
 end.
)

      JVERSION
Engine: j902/j64avx2/darwin
Beta-j: commercial/2020-10-29T16:26:56
Library: 9.02.06
Platform: Darwin 64
Installer: J902 install
InstallPath: /applications/j902
Contact: www.jsoftware.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to