Table column with maked data drops mask
See original GitHub issue[EDIT]: See https://github.com/astropy/astropy/issues/8816#issuecomment-500598908 for a more direct example of the bug.
import numpy as np
from astropy.table import Table
data = np.ma.masked_greater(np.arange(5), 3)
tab = Table({'data': [data]})
mtab = Table({'data': [data]}, masked=True)
data, tab['data'][0], mtab['data'][0]
gives:
(masked_array(data=[0, 1, 2, 3, --],
mask=[False, False, False, False, True],
fill_value=999999),
array([0, 1, 2, 3, 4]),
masked_BaseColumn(data=[0, 1, 2, 3, 4],
mask=[False, False, False, False, False],
fill_value=999999))
So neither the table, nor the masked table respects the mask of the input data and silently converts the array to use the “data behind the mask”.
CC:@taldcroft
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Dynamic Data Masking - SQL Server | Microsoft Learn
Users with SELECT permission on a table can view the table data. Columns that are defined as masked, will display the masked data....
Read more >Dynamic Data Masking – Altering the masked column
How to alter/drop a masked column? Dynamic Data Masking can be implemented in new tables or even existing tables in your database.
Read more >DROP MASKED | SqlHints.com
Dynamic data masking functions/rule can be defined on the table columns for which we need the masked out-put in the query result.
Read more >Dynamic Data Masking In SQL Server - SQLShack
The default mask, masks complete values in the specified column. To specify a mask for a particular column, you have to use the...
Read more >Db2 12 - Security - Column mask - IBM
A column mask is a database object that describes a specific column access ... group, or role can receive the masked values that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pllim Don’t worry. I’ve been programming with @taldcroft for almost one decade now. I’m just joking. I know he takes me serious.
For now, workaround seems to be:
FWIW, it works as expected without the square brackets: