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
1611288905,I_kwDOAMm_X85gClFJ,7587,xr.where increase the bytes of the dataset ,54963611,closed,0,,,9,2023-03-06T12:17:25Z,2023-03-07T08:05:02Z,2023-03-07T08:05:01Z,NONE,,,,"### What is your issue?

Hello,

I was just using the xr.where to find where a data was == 0, in order to replace it with a np.nan. 
To do this I was using xr.where, until I realized that this command increases a lot the bytes of the variable.

Here there is an example:
`da_fam_bulk = xr.open_dataset(ifileFamBulk)`
`da_fam_bulk.nbytes`
386381420

`a = xr.where(da_fam_bulk['tp'] != 0,da_fam_bulk,np.nan)`
`a.nbytes`
32415815276

The same result I found using directly da_fam_bulk.where.
Do you know why?

Thank you,","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7587/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue