Skip to content

Commit b674963

Browse files
authored
Merge pull request #233 from JohanMabille/fix
Fixed io and notebook
2 parents 139dba5 + 00c39e4 commit b674963

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

include/xframe/xio.hpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
#include "xtensor/xio.hpp"
1616

1717
#ifdef __CLING__
18+
19+
#include <nlohmann/json.hpp>
20+
21+
namespace nl = nlohmann;
22+
1823
namespace xf
1924
{
2025
template <class P, class T>
@@ -356,7 +361,7 @@ namespace xf
356361
}
357362

358363
template <class T>
359-
xeus::xjson mime_bundle_repr_impl(const T& expr)
364+
nl::json mime_bundle_repr_impl(const T& expr)
360365
{
361366
std::stringstream out;
362367

@@ -380,7 +385,7 @@ namespace xf
380385

381386
xf::compute_nd_table(out, printer, expr, edge_items);
382387

383-
auto bundle = xeus::xjson::object();
388+
auto bundle = nl::json::object();
384389
bundle["text/html"] = out.str();
385390
return bundle;
386391
}
@@ -389,7 +394,7 @@ namespace xf
389394
class xvariable_container;
390395

391396
template <class CCT, class ECT>
392-
xeus::xjson mime_bundle_repr(const xvariable_container<CCT, ECT>& expr)
397+
nl::json mime_bundle_repr(const xvariable_container<CCT, ECT>& expr)
393398
{
394399
return xf::mime_bundle_repr_impl(expr);
395400
}
@@ -398,7 +403,7 @@ namespace xf
398403
class xvariable_function;
399404

400405
template <class F, class R, class... CT>
401-
xeus::xjson mime_bundle_repr(const xvariable_function<F, R, CT...>& expr)
406+
nl::json mime_bundle_repr(const xvariable_function<F, R, CT...>& expr)
402407
{
403408
using temporary_type = typename xvariable_function<F, R, CT...>::temporary_type;
404409
temporary_type tmp(expr);
@@ -409,7 +414,7 @@ namespace xf
409414
class xvariable_view;
410415

411416
template <class CT>
412-
xeus::xjson mime_bundle_repr(const xvariable_view<CT>& expr)
417+
nl::json mime_bundle_repr(const xvariable_view<CT>& expr)
413418
{
414419
return xf::mime_bundle_repr_impl(expr);
415420
}
@@ -418,7 +423,7 @@ namespace xf
418423
class xvariable_masked_view;
419424

420425
template <class CTV, class CTAX>
421-
xeus::xjson mime_bundle_repr(const xvariable_masked_view<CTV, CTAX>& expr)
426+
nl::json mime_bundle_repr(const xvariable_masked_view<CTV, CTAX>& expr)
422427
{
423428
return xf::mime_bundle_repr_impl(expr);
424429
}
@@ -427,7 +432,7 @@ namespace xf
427432
class xreindex_view;
428433

429434
template <class E>
430-
xeus::xjson mime_bundle_repr(const xreindex_view<E>& expr)
435+
nl::json mime_bundle_repr(const xreindex_view<E>& expr)
431436
{
432437
return xf::mime_bundle_repr_impl(expr);
433438
}

notebooks/xframe.ipynb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,6 @@
7474
"![xframe_summary](images/xframe_summary.png)"
7575
]
7676
},
77-
{
78-
"cell_type": "code",
79-
"execution_count": null,
80-
"metadata": {},
81-
"outputs": [],
82-
"source": [
83-
"![xframe_summary](images/xframe_summar.png)"
84-
]
85-
},
8677
{
8778
"cell_type": "code",
8879
"execution_count": null,
@@ -682,7 +673,7 @@
682673
"kernelspec": {
683674
"display_name": "C++14",
684675
"language": "C++14",
685-
"name": "xeus-cling-cpp14"
676+
"name": "xcpp14"
686677
},
687678
"language_info": {
688679
"codemirror_mode": "text/x-c++src",

0 commit comments

Comments
 (0)