Comments (4)
Also, it should perhaps be Int
not int
:
In [5]: ds = dshape('2, 2, int')
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-5-813d8219d63f> in <module>()
----> 1 ds = dshape('2, 2, int')
/home/esc/git-working/blaze/blaze/datashape/__init__.pyc in dshape(o)
8 def dshape(o):
9 if isinstance(o, str):
---> 10 return parser.parse(o)
11 elif isinstance(o, DataShape):
12 return o
/home/esc/git-working/blaze/blaze/datashape/parser.pyc in parse(pattern)
415 # to trigger a re-creation of the parser.
416 parser = load_parser(False)
--> 417 ds = parser(pattern)
418
419 # Just take the type from "type X = Y" statements
/home/esc/anaconda/lib/python2.7/site-packages/ply/yacc.pyc in parse(self, input, lexer, debug, tracking, tokenfunc)
263 return self.parseopt(input,lexer,debug,tracking,tokenfunc)
264 else:
--> 265 return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
266
267
/home/esc/anaconda/lib/python2.7/site-packages/ply/yacc.pyc in parseopt_notrack(self, input, lexer, debug, tracking, tokenfunc)
969 del symstack[-plen:]
970 del statestack[-plen:]
--> 971 p.callable(pslice)
972 symstack.append(sym)
973 state = goto[statestack[-1]][pname]
/home/esc/git-working/blaze/blaze/datashape/parser.pyc in p_rhs_expression_list__bit(p)
239 def p_rhs_expression_list__bit(p):
240 '''rhs_expression_list : BIT'''
--> 241 p[0] = (T.Type._registry[p[1]],)
242
243 def p_rhs_expression_list__name(p):
KeyError: 'int'
In [6]: ds = dshape('2, 2, Int')
In [7]: ds
Out[7]: dshape("2, 2, Int")
from blaze.
Delay that order:
In [13]: ds
Out[13]: dshape("2, 2, Int")
In [14]: a = Array([1, 2, 3, 4], ds)
---------------------------------------------------------------------------
NotNumpyCompatible Traceback (most recent call last)
<ipython-input-14-0aecd0842e96> in <module>()
----> 1 a = Array([1, 2, 3, 4], ds)
/home/esc/git-working/blaze/blaze/table.pyc in __init__(self, obj, dshape, metadata, layout, params)
177 params=params)
178 else:
--> 179 self.data = CArraySource(obj, dshape=dshape, params=params)
180
181 # children graph nodes
/home/esc/git-working/blaze/blaze/sources/chunked.pyc in __init__(self, data, dshape, params)
61
62 if dshape:
---> 63 shape, dtype = to_numpy(dshape)
64 self.ca = carray.carray(data, dtype=dtype, rootdir=rootdir, cparams=cparams)
65 self.dshape = dshape
/home/esc/git-working/blaze/blaze/datashape/coretypes.pyc in to_numpy(ds)
918 dtype = msr.to_dtype()
919 else:
--> 920 raise NotNumpyCompatible('Datashape measure %s is not NumPy-compatible' % dim)
921
922 if type(dtype) != np.dtype:
NotNumpyCompatible: Datashape measure 2 is not NumPy-compatible
from blaze.
err: Constructing a blaze array directly requires a data descriptor, not type <type 'list'>
the document under the docs directory is fresh and useful.
from blaze.
This has been fixed.
from blaze.
Related Issues (20)
- Integer column has NA values in column when count values on HMDA large data HOT 1
- Pandas to Blaze doc sample not working under python 3.6
- Are there any solutions for a Blaze ecosystem like hadoop? HOT 1
- networkx 2.0 api changes HOT 2
- Transitioning the Blaze project HOT 11
- Separate backends from core HOT 1
- `by` ignores the join condition
- dshape does not stick in bz.Data(...) HOT 13
- Blaze to RESTful endpoint
- (sqlite3.OperationalError) no such function: greatest HOT 1
- ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216
- removing redundancy
- Filtering with `by` ignores the group by condition HOT 1
- Dependency on pandas tslib HOT 1
- Fix simple typo: absense -> absence
- Unable to install pyhive from Anaconda Prompt HOT 1
- Importing ABC from collections was removed in Python 3.9
- Deprecation warning due to invalid escape sequences in Python 3.8
- BUG:TypeError: Cannot interpret 'CategoricalDtype(categories=['no', 'yes'], ordered=False)' as a data type
- Data analytics
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 blaze.