@@ -267,8 +267,6 @@ def __init__(
267
267
dims : Union [Hashable , Sequence [Hashable ], None ] = None ,
268
268
name : Hashable = None ,
269
269
attrs : Mapping = None ,
270
- # deprecated parameters
271
- encoding = None ,
272
270
# internal parameters
273
271
indexes : Dict [Hashable , pd .Index ] = None ,
274
272
fastpath : bool = False ,
@@ -313,20 +311,10 @@ def __init__(
313
311
Attributes to assign to the new instance. By default, an empty
314
312
attribute dictionary is initialized.
315
313
"""
316
- if encoding is not None :
317
- warnings .warn (
318
- "The `encoding` argument to `DataArray` is deprecated, and . "
319
- "will be removed in 0.15. "
320
- "Instead, specify the encoding when writing to disk or "
321
- "set the `encoding` attribute directly." ,
322
- FutureWarning ,
323
- stacklevel = 2 ,
324
- )
325
314
if fastpath :
326
315
variable = data
327
316
assert dims is None
328
317
assert attrs is None
329
- assert encoding is None
330
318
else :
331
319
# try to fill in arguments from data if they weren't supplied
332
320
if coords is None :
@@ -348,13 +336,11 @@ def __init__(
348
336
name = getattr (data , "name" , None )
349
337
if attrs is None and not isinstance (data , PANDAS_TYPES ):
350
338
attrs = getattr (data , "attrs" , None )
351
- if encoding is None :
352
- encoding = getattr (data , "encoding" , None )
353
339
354
340
data = _check_data_shape (data , coords , dims )
355
341
data = as_compatible_data (data )
356
342
coords , dims = _infer_coords_and_dims (data .shape , coords , dims )
357
- variable = Variable (dims , data , attrs , encoding , fastpath = True )
343
+ variable = Variable (dims , data , attrs , fastpath = True )
358
344
indexes = dict (
359
345
_extract_indexes_from_coords (coords )
360
346
) # needed for to_dataset
0 commit comments