Comments (3)
This would require an extra string argument for the constructor. I think it's too ambiguous as a default operation. The work-around is to check the size of a tensor before preallocation, and use a MappedTensor
if it's too big.
from mappedtensor.
I added this constructor in the first swtich/case option at line 199.
x = MappedTensor(y,'convert')
returns y if y is a MappedTensor
otherwise converts y to a MappedTensor
case {'convert'}
% - Special case of MappedTensor(A, 'convert')
if isa(varargin{1},'MappedTensor')
mtVar = varargin{1};
else
tfData = varargin{1};
mtVar = MappedTensor(size(tfData),'Class',class(tfData));
subsasgn(mtVar,struct('subs',{{':'}}), tfData);
end
return;
We do rely on the goodwill of users not to intentionally try and break the function, as the input validation is minimal... I like to think people are basically good :)
from mappedtensor.
Ok, 'Convert' and 'Like' arguments are now supported.
from mappedtensor.
Related Issues (15)
- Allow integer types for index variables HOT 21
- Shortcut casting causes errors HOT 1
- Shortcut casting still causes errors HOT 1
- Constructor fails with complex input HOT 2
- Does it have to inherit from a handle object? HOT 6
- Data is corrupted when subsampling a large file (8Gb) on windows HOT 13
- 340 Gigabyte data and error while creating .mex from mapped_tensor_shim.c HOT 4
- Error with uint indexes HOT 1
- Indexing a mapped tensor after permutation
- Add overloaded `prod` method HOT 3
- Overloaded `plus` method bug HOT 3
- a=cast(a) could be implemented with strClass HOT 1
- class char silently converts to double HOT 17
- Empty index causes error HOT 1
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 mappedtensor.