-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path_utils.py
More file actions
29 lines (20 loc) · 737 Bytes
/
_utils.py
File metadata and controls
29 lines (20 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
try:
from math import prod
except:
from functools import reduce
from operator import mul
prod = lambda seq: reduce(mul, seq, 1)
def dtype_itemsize(dtype):
return int(dtype[-1])
def get_samplesize(shape, dtype):
return prod(shape) * dtype_itemsize(dtype)
def deprecate_core():
from importlib import metadata
import warnings
try:
metadata.version("ffmpegio-core")
except metadata.PackageNotFoundError:
return
warnings.warn(
message="!!PACKAGE CONFLICT!! ffmpegio-core distribution package has been deprecated. Please read the following link for the instructions: https://github.com/python-ffmpegio/python-ffmpegio/wiki/Instructions-to-upgrade-to-v0.11.0."
)