mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Fix using custom (JSON) profile
This commit is contained in:
parent
6c6819f844
commit
b13589cc33
@ -1,5 +1,7 @@
|
|||||||
import numpy as np
|
import os
|
||||||
|
import json
|
||||||
import argparse
|
import argparse
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
from genome.specs import toplevels
|
from genome.specs import toplevels
|
||||||
from genome.use import RefWrapper, SplineWrapper
|
from genome.use import RefWrapper, SplineWrapper
|
||||||
@ -54,7 +56,7 @@ def get_from_args(args):
|
|||||||
Get profile from an ArgumentParser result. Returns `(name, prof)`.
|
Get profile from an ArgumentParser result. Returns `(name, prof)`.
|
||||||
"""
|
"""
|
||||||
if args.profile:
|
if args.profile:
|
||||||
name = args.profile.name
|
name = os.path.basename(args.profile.name).rsplit('.', 1)[0]
|
||||||
base = json.load(args.profile)
|
base = json.load(args.profile)
|
||||||
else:
|
else:
|
||||||
name = args.builtin_profile
|
name = args.builtin_profile
|
||||||
|
Loading…
Reference in New Issue
Block a user