issues: 123971294
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
123971294 | MDU6SXNzdWUxMjM5NzEyOTQ= | 684 | to_masked_array should have an option to always return array | 5049737 | closed | 0 | 1 | 2015-12-27T10:15:59Z | 2015-12-27T19:40:02Z | 2015-12-27T19:40:02Z | MEMBER | Hello, I'm working with Monary and xray and faced a problem because ``` In [1]: ma.masked_array(df['Bid'].values, df['Bid'].isnull()) Out[1]: masked_array(data = [0.81 0.88805 0.8880899999999999 ..., 0.87531 0.87531 0.87531], mask = [False False False ..., False False False], fill_value = 1e+20) In [2]: ds.Bid.to_masked_array() Out[2]: masked_array(data = [ 0.81 0.88805 0.88809 ..., 0.87531 0.87531 0.87531], mask = False, fill_value = 1e+20) ``` So we have
instead of
It will be nice if a parameter could be passed to always return array. Here is my code With sample data from https://drive.google.com/file/d/0B8iUtWjZOTqla3ZZTC1FS0pkZXc/view?usp=sharing
It raises ``` //anaconda/lib/python3.4/site-packages/monary/monary.py in insert(self, db, coll, params, write_concern) 763 for i, param in enumerate(params): 764 data_p = param.array.data.ctypes.data_as(ctypes.c_void_p) --> 765 mask_p = param.array.mask.ctypes.data_as(ctypes.c_void_p) 766 767 if cmonary.monary_set_column_item( AttributeError: 'numpy.bool_' object has no attribute 'ctypes' ``` see
An other option could be to fix this on Monary side https://bitbucket.org/djcbeach/monary/issues/22/insert-doesnt-work-correctly-when-mask-is Kind regards |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/684/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |