Thanks, @agoose77, for answering this! You made all the points I wanted to except the "why".

You can make subclasses of ak.Array and ak.Record, but you have to assign them through ak.behavior. There's a big write-up of that here:

https://awkward-array.readthedocs.io/en/latest/ak.behavior.html

When you do array manipulations, you end up creating new array objects all the time—every slice is a new array object from Python's point of view (though the data buffers themselves share a lot of memory for efficiency). The ak.behavior is a set of rules for applying your subclasses to new array objects depending on "parameters" in the array, so even if your data type is buried deeply in a data structure (and there are no Python classes associated with it), when it comes to the surface through a slice or something, it will be wrapped by the right Python class (which must be a subclass of ak.Array or ak.Record, depending on what you're doing).

This change was caused by ccd7537.

Oh, yeah, the old behavior worked by accident. Before that fix, it wasn't checking ak.behavior, which let the class be stale (and therefore wrong) in some cases and allowed your Wrapper without going through the ak.behavior mechanism, @fleble. The new version revealed unintended behavior that you were using. Switching to ak.behavior would make it more stable anyway: if you have records inside the Array that need to be interpreted a particular way, this would wrap them any time they come to the surface through a slice, not just when you explicitly call Wrapper.

🌐
Awkward-array
awkward-array.org › doc › main › reference › generated › ak.Array.html
ak.Array — Awkward Array 2.9.0 documentation
If a dict of str → columns, combines the columns into an array of records (like Pandas’s DataFrame constructor). If a string, the data are assumed to be JSON. If an iterable, calls ak.from_iter, which assumes all dimensions have irregular lengths.
Getting started
How do I get Awkward Arrays, or read or write files of them? ... the ak.Array constructor takes NumPy arrays, CuPy arrays, pyarrow arrays, or an iterable of Python builtin lists and dicts, such as
ak.Record
Records can be used in Numba: they can be passed as arguments to a Numba-compiled function or returned as return values. The only limitation is that they cannot be created inside the Numba-compiled function; to make outputs, consider ak.ArrayBuilder.
ak.to_numpy
Defined in awkward.operations.ak_to_numpy on line 12. ... Converts an Awkward Array into a NumPy array, if possible.
ak.to_dataframe
Defined in awkward.operations.ak_to_dataframe on line 24.
🌐
Awkward-array
awkward-array.org › doc › main › reference › generated › ak.count.html
ak.count — Awkward Array 2.9.0 documentation
axis (None or int or str) – If None, combine all values from the array into a single scalar result; if an int, group by that axis: 0 is the outermost, 1 is the first level of nested lists, etc., and negative axis counts from the innermost: -1 is the innermost, -2 is the next level up, etc; if a str, it is interpreted as the name of the axis which maps to an int if named axes are present. Named axes are attached to an array using ak.with_named_axis and removed with ak.without_named_axis; also see the Named axes user guide.
Top answer
1 of 1
1

Thanks, @agoose77, for answering this! You made all the points I wanted to except the "why".

You can make subclasses of ak.Array and ak.Record, but you have to assign them through ak.behavior. There's a big write-up of that here:

https://awkward-array.readthedocs.io/en/latest/ak.behavior.html

When you do array manipulations, you end up creating new array objects all the time—every slice is a new array object from Python's point of view (though the data buffers themselves share a lot of memory for efficiency). The ak.behavior is a set of rules for applying your subclasses to new array objects depending on "parameters" in the array, so even if your data type is buried deeply in a data structure (and there are no Python classes associated with it), when it comes to the surface through a slice or something, it will be wrapped by the right Python class (which must be a subclass of ak.Array or ak.Record, depending on what you're doing).

This change was caused by ccd7537.

Oh, yeah, the old behavior worked by accident. Before that fix, it wasn't checking ak.behavior, which let the class be stale (and therefore wrong) in some cases and allowed your Wrapper without going through the ak.behavior mechanism, @fleble. The new version revealed unintended behavior that you were using. Switching to ak.behavior would make it more stable anyway: if you have records inside the Array that need to be interpreted a particular way, this would wrap them any time they come to the surface through a slice, not just when you explicitly call Wrapper.

People also ask

Where does the AK-47 | Point Disarray come from?
Point Disarray comes from the Revolver Case. At Classified rarity, it has an individual drop chance of approximately 1.07%, or roughly 1 in 93 cases. StatTrak™ versions drop at approximately 0.107%, about 1 in 935 cases.
🌐
stash.clash.gg
stash.clash.gg › home › ak-47 › point disarray
AK-47 | Point Disarray - CS2 Prices (924 Listings)
Is the AK-47 | Point Disarray available in StatTrak™?
Yes, Point Disarray is available in StatTrak™ in Factory New, Minimal Wear, Field-Tested, Well-Worn, and Battle-Scarred.
🌐
stash.clash.gg
stash.clash.gg › home › ak-47 › point disarray
AK-47 | Point Disarray - CS2 Prices (924 Listings)
How rare is the AK-47 | Point Disarray?
Point Disarray is Classified rarity. There are 3 Classified skins in The Revolver Case Collection, giving it an individual drop chance of approximately 1.07%, roughly 1 in 93 case openings. StatTrak™ versions drop at approximately 0.107%, about 1 in 935 cases.
🌐
stash.clash.gg
stash.clash.gg › home › ak-47 › point disarray
AK-47 | Point Disarray - CS2 Prices (924 Listings)
🌐
Readthedocs
vector.readthedocs.io › en › latest › src › awkward.html
Awkward Arrays of vectors — Vector 1.8.2.dev27+g6ee7f8d31
An Awkward Array needs all of the following for its records to be interpreted as vectors: the record name, which can be assigned using ak.with_name or as a constructor argument, must be one of "Vector2D", "Momentum2D", "Vector3D", "Momentum3D", "Vector4D", and "Momentum4D"
🌐
Awkward-array
awkward-array.org › doc › main › reference › generated › ak.prod.html
ak.prod — Awkward Array 2.8.7 documentation
Multiplies elements of array (many types supported, including all Awkward Arrays and Records). The identity of multiplication is 1 and it is usually not masked. This operation is the same as NumPy’s prod if all lists at a given dimension have the same length and no None values, but it generalizes ...
🌐
CS2 Skins
stash.clash.gg › home › ak-47 › point disarray
AK-47 | Point Disarray - CS2 Prices (924 Listings)
Point Disarray - Up close it is chaos... from a distance it is beauty - Franz Kriegeld, Phoenix Tactician
Price: $14.58
🌐
Awkward-array
awkward-array.org › doc › main › reference › generated › ak.where.html
ak.where — Awkward Array 2.9.0 documentation
highlevel (bool, default is True) – If True, return an ak.Array; otherwise, return a low-level ak.contents.Content subclass.
Find elsewhere
🌐
Awkward-array
awkward-array.org › doc › 2.2 › reference › generated › ak.var.html
ak.var — Awkward Array 2.2.4 documentation
Computes the variance in each group of elements from x (many types supported, including all Awkward Arrays and Records). The grouping is performed the same way as for reducers, though this operation is not a reducer and has no identity. It is the same as NumPy’s var if all lists at a given ...
🌐
Facebook
facebook.com › ProvidenceHealthAlaska › photos › the-providence-kodiak-island-counseling-center-offers-a-wide-array-of-behavioral › 10160721971998065
Providence Alaska
Providence Alaska. 13,910 followers · 343 talking about this. Providence has a long history of serving Alaska, beginning when the Sisters of Providence opened the first hospital in Nome in 1902.
🌐
Facebook
facebook.com › sweetsavoryak
Array of Sweet & Savory | Kenai AK
Explore the things you love · Log in to Facebook · English (UK) · Русский · Українська · Suomi · 中文(简体) · Deutsch · العربية · More languages…
🌐
Belmaspreciousflowers
belmaspreciousflowers.com › home › abundant array arrangement
Abundant Array Arrangement – blush, pink, purple flower arrangement | Kodiak, AK | Belma's Precious Flowers
Abundant Array Arrangement - Our Abundant Array Arrangement is full of romantic intrigue and sweet beauty to offer its exquisite color and texture to your wedding celebration. Pink garden roses, ranunculus, tulips, and double lisianthus are accented with blush hydrangea, purple lilac, seeded eucalyptus, and variegated ivy, all gorgeously arranged in a tall clear glass vase to bring a special ambiance to your big day.Arrangement is approximately 18" H x 12" W Rose Hydrangea Tulip Lilac
Price: $304.99
🌐
FindHelp
findhelp.org › provider › array-behavioral-care--chicago-il › 5641278728175616
Programs by Array Behavioral Care serving Kodiak, AK | findhelp.org
Programs offered by Array Behavioral Care serving Kodiak, AK to help with social needs, including Telehealth Services.
🌐
Alaskagoodtimecharters
alaskagoodtimecharters.com › photos.html
Experience Alaska's Wide-array of Breathtaking Scenery
Alaska Good Time Charters specializes in Anchorage, Alaska Halibut Fishing, Black Bear Hunts, and Alaska Sightseeing Cruises. Just 60 miles from Anchorage.
🌐
Instagram
instagram.com › p › BqOCKFUna9b
Just a normal business day down here in Anchorage...
Create an account or log in to Instagram - Share what you're into with the people who get you.
🌐
Matterport
matterport.com › blog › music-store-browsing-makes-triumphant-return
Music Store Browsing Makes a Triumphant Return | Matterport
His musings are as wise today as they were during his time on earth from 551 to 479 BC, and Rich Chandler, owner and manager of Sway Array Designs in Anchorage, Alaska, certainly shares the legendary philosopher’s sentiments.
🌐
Swayarraymedia
swayarraymedia.com › menu.php
photography information, Sway Array Designs
In 2021 Matterport conducted an interview with Sway Array Designs regarding an interactive 3D Model we created with a music store.