Comments (5)
The UndefVarError is fixed in #272, but that doesn't fix this issue, which I also ran into. Now your first example gives:
x = VectorOfArray([randn(2) for _ in 1:4]);
reshape(x, :)
# -> DimensionMismatch: parent has 8 elements, which is incompatible with size (4,)
This is related to the somewhat odd situation that length(x) == 4
and size(x) == (2,4)
, i.e. it seems to behave like both a vector and a matrix, but x isa AbstractMatrix
.
The function vec
according to the Base docs should return the same underlying data, but vec(x)
creates a copy.
For my 1D example I could use reshape(x, prod(size(x)))
as a workaround.
from recursivearraytools.jl.
it seems to behave like both a vector and a matrix, but
x isa AbstractMatrix
.
For me this is a deal-breaker. I want one or the other. It's easy for me to create a vector of vectors, but I explicitly want to use this type to treat those as an AbstractMatrix
.
from recursivearraytools.jl.
yeah and that would be changed if someone has a good way to do it.
from recursivearraytools.jl.
This works now. I think the issue can be closed?
from recursivearraytools.jl.
Indeed, reshape(::VectorOfArray, ::Any...)
was redefined in #290, and this now works.
from recursivearraytools.jl.
Related Issues (20)
- ArrayPartition([1,1],[1])[1:3,1] segfaults. HOT 2
- Broadcasting with Float ArrayPartition HOT 2
- Loosen type constraints for ArrayPartition copy? HOT 2
- Incorrect `iszero` behavior HOT 2
- Improve docstrings
- Prepending/appending a list of ArrayPartition HOT 1
- similar() of ArrayPartition involving primitives fails HOT 3
- `@deprecate` usage invalid on Julia <=1.7 HOT 8
- Implement `pointer` and `resize!` for `VectorOfArray`
- v3.2.0 precompiles fail with "Method definition overwritten" HOT 5
- Type instability when iterating nested recursive arrays HOT 7
- Fix method ambiguities.
- views with `Vector{Bool}` indices are broken HOT 1
- 3.4.1 -> 3.4.2 breaking HOT 5
- Documentation does not reflect deprecation of linear indexing HOT 2
- Add `eachrow`/`eachcol`/`eachslice` for `AbstractVectorOfArray`
- `getindex` with slice breaks on size 1 arrays
- ArrayPartition Incompatible for Native Implicit SDE Solvers HOT 4
- Getting the `sol` of an observed variable (using SymbolicIndexingInterface) of a trivial ODE (with no reduced states) fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recursivearraytools.jl.