Coder Social home page Coder Social logo

unable to change dim about delayedarray HOT 4 CLOSED

mikejiang avatar mikejiang commented on July 4, 2024
unable to change dim

from delayedarray.

Comments (4)

hpages avatar hpages commented on July 4, 2024

Ah, perfect! DelayedArray objects didn't support this so far and I was thinking in adding it. It's on the TODO list:

DelayedArray/TODO

Lines 14 to 16 in 998fa6a

- dim() setter allows dropping ineffective dimensions so should also allow
adding ineffective dimensions e.g. if dim(A) is c(2, 10, 8) we should be
able to do dim(A) <- c(1, 1, 2, 10, 1, 8).

I think it should be easy. Great that you have a use case. I'll try to have this ready today or tomorrow.

from delayedarray.

mikejiang avatar mikejiang commented on July 4, 2024

Great!

from delayedarray.

hpages avatar hpages commented on July 4, 2024

This should work with DelayedArray 0.7.42: b8a6103

Note that, unlike with an ordinary array, the are still restrictions w.r.t. what the dim() setter can do on a DelayedArray object x. For example if dim(x) is c(5, 4), you can't do dim(x) <- c(10, 2). However you can change the order of the dims with aperm() (generalized transposition).

from delayedarray.

mikejiang avatar mikejiang commented on July 4, 2024

Nice! Thanks a lot.

from delayedarray.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.