|
14 | 14 | __copyright__,
|
15 | 15 | )
|
16 | 16 | except ImportError:
|
17 |
| - __version__ = "Failed to load from _metadata.py" |
18 |
| - __author__ = __version__ |
19 |
| - __email__ = __version__ |
20 |
| - __license__ = __version__ |
21 |
| - __status__ = __version__ |
22 |
| - __maintainer__ = __version__ |
23 |
| - __credits__ = __version__ |
24 |
| - __url__ = __version__ |
25 |
| - __description__ = __version__ |
26 |
| - __copyright__ = __version__ |
| 17 | + try: |
| 18 | + from _metadata import ( |
| 19 | + __version__, |
| 20 | + __author__, |
| 21 | + __email__, |
| 22 | + __license__, |
| 23 | + __status__, |
| 24 | + __maintainer__, |
| 25 | + __credits__, |
| 26 | + __url__, |
| 27 | + __description__, |
| 28 | + __copyright__, |
| 29 | + ) |
| 30 | + except ImportError: |
| 31 | + # _metadata.py failed to load, |
| 32 | + # fill in with dummy values (script may be standalone) |
| 33 | + __version__ = "Failed to load from _metadata.py" |
| 34 | + __author__ = __version__ |
| 35 | + __email__ = __version__ |
| 36 | + __license__ = __version__ |
| 37 | + __status__ = __version__ |
| 38 | + __maintainer__ = __version__ |
| 39 | + __credits__ = __version__ |
| 40 | + __url__ = __version__ |
| 41 | + __description__ = __version__ |
| 42 | + __copyright__ = __version__ |
| 43 | + |
| 44 | +# %% -------------------------------------------------------------------------- |
27 | 45 |
|
28 | 46 | __all__ = [
|
29 | 47 | "DynamicVector",
|
@@ -331,7 +349,7 @@ def array(cls, object, dtype=None, capacity=8, grow_use_add=None, grow_add=None)
|
331 | 349 |
|
332 | 350 | Parameters:
|
333 | 351 | object (array_like): Size and dtype of array used to build the DynamicVector.
|
334 |
| - dtype (type, optional): The type of the full in the vector. Defaults to `np.array(fill_value).dtype`. |
| 352 | + dtype (type, optional): The type of the full in the vector. Defaults to `np.array(object).dtype`. |
335 | 353 | capacity (int, optional): Initial minimum capacity of the underlying storage vector. Defaults to max(8, len(object)).
|
336 | 354 |
|
337 | 355 | Returns:
|
|
0 commit comments